forked from administration/panel
Merge branch 'main' into fix-1
commit
ccd3e58d5d
|
@ -169,10 +169,15 @@ const ACL: Record<string, Set<Permission>> = {
|
||||||
...Roles["revolt-discover"],
|
...Roles["revolt-discover"],
|
||||||
...Roles["user-support"],
|
...Roles["user-support"],
|
||||||
] as Permission[]),
|
] as Permission[]),
|
||||||
|
"me@zomatree.live": new Set([
|
||||||
|
...Roles["moderator"],
|
||||||
|
...Roles["revolt-discover"],
|
||||||
|
...Roles["user-support"],
|
||||||
|
] as Permission[]),
|
||||||
};
|
};
|
||||||
|
|
||||||
function hasPermission(email: string, permission: Permission) {
|
function hasPermission(email: string, permission: Permission) {
|
||||||
// if (email === "insert@revolt.chat") return true;
|
if (email === "insert@revolt.chat") return true;
|
||||||
if (!ACL[email]) throw `user is not registered in system: ${email}`;
|
if (!ACL[email]) throw `user is not registered in system: ${email}`;
|
||||||
|
|
||||||
const segments = permission.split("/");
|
const segments = permission.split("/");
|
||||||
|
|
Loading…
Reference in New Issue