Skip to content

Commit

Permalink
Remove Local Admin Group handling
Browse files Browse the repository at this point in the history
These groups have been deleted and are no longer supported.

It doesn't make sense talking about "global admins" anymore, so we just
refer to them as "admins".

tutadb#1919

Co-authored-by: Vitor Sakaguti <vis@tutao.de>
  • Loading branch information
hdcos and vitoreiji committed Dec 17, 2024
1 parent c6e8e0b commit 272b702
Show file tree
Hide file tree
Showing 22 changed files with 589 additions and 1,484 deletions.
76 changes: 42 additions & 34 deletions libs/electron-updater.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11584,46 +11584,54 @@ const coerce$1 = (version, options) => {
};
var coerce_1 = coerce$1;

class LRUCache {
constructor () {
this.max = 1000;
this.map = new Map();
}
var lrucache;
var hasRequiredLrucache;

function requireLrucache () {
if (hasRequiredLrucache) return lrucache;
hasRequiredLrucache = 1;
class LRUCache {
constructor () {
this.max = 1000;
this.map = new Map();
}

get (key) {
const value = this.map.get(key);
if (value === undefined) {
return undefined
} else {
// Remove the key from the map and add it to the end
this.map.delete(key);
this.map.set(key, value);
return value
}
}
get (key) {
const value = this.map.get(key);
if (value === undefined) {
return undefined
} else {
// Remove the key from the map and add it to the end
this.map.delete(key);
this.map.set(key, value);
return value
}
}

delete (key) {
return this.map.delete(key)
}
delete (key) {
return this.map.delete(key)
}

set (key, value) {
const deleted = this.delete(key);
set (key, value) {
const deleted = this.delete(key);

if (!deleted && value !== undefined) {
// If cache is full, delete the least recently used item
if (this.map.size >= this.max) {
const firstKey = this.map.keys().next().value;
this.delete(firstKey);
}
if (!deleted && value !== undefined) {
// If cache is full, delete the least recently used item
if (this.map.size >= this.max) {
const firstKey = this.map.keys().next().value;
this.delete(firstKey);
}

this.map.set(key, value);
}
this.map.set(key, value);
}

return this
}
}
return this
}
}

var lrucache = LRUCache;
lrucache = LRUCache;
return lrucache;
}

var range;
var hasRequiredRange;
Expand Down Expand Up @@ -11845,7 +11853,7 @@ function requireRange () {

range = Range;

const LRU = lrucache;
const LRU = requireLrucache();
const cache = new LRU();

const parseOptions = parseOptions_1;
Expand Down
15 changes: 15 additions & 0 deletions schemas/sys.json
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,21 @@
"info": "AddValue PubEncKeyData/senderIdentifierType/2531."
}
]
},
{
"version": 117,
"changes": [
{
"name": "RemoveAssociation",
"sourceType": "Group",
"info": "RemoveAssociation Group/administratedGroups."
},
{
"name": "RemoveAssociation",
"sourceType": "GroupInfo",
"info": "RemoveAssociation GroupInfo/localAdmin."
}
]
}
]
}
4 changes: 2 additions & 2 deletions src/common/api/entities/sys/ModelInfo.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const modelInfo = {
version: 116,
compatibleSince: 116,
version: 117,
compatibleSince: 117,
}

export default modelInfo
10 changes: 0 additions & 10 deletions src/common/api/entities/sys/Services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import { GroupKeyRotationInfoGetOutTypeRef } from "./TypeRefs.js"
import { GroupKeyRotationPostInTypeRef } from "./TypeRefs.js"
import { InvoiceDataGetInTypeRef } from "./TypeRefs.js"
import { InvoiceDataGetOutTypeRef } from "./TypeRefs.js"
import { LocalAdminRemovalPostInTypeRef } from "./TypeRefs.js"
import { LocationServiceGetReturnTypeRef } from "./TypeRefs.js"
import { MailAddressAliasGetInTypeRef } from "./TypeRefs.js"
import { MailAddressAliasServiceReturnTypeRef } from "./TypeRefs.js"
Expand Down Expand Up @@ -299,15 +298,6 @@ export const InvoiceDataService = Object.freeze({
delete: null,
} as const)

export const LocalAdminRemovalService = Object.freeze({
app: "sys",
name: "LocalAdminRemovalService",
get: null,
post: { data: LocalAdminRemovalPostInTypeRef, return: null },
put: null,
delete: null,
} as const)

export const LocationService = Object.freeze({
app: "sys",
name: "LocationService",
Expand Down
Loading

0 comments on commit 272b702

Please sign in to comment.