forked from administration/panel
feat: allow permission bypass via env var
parent
7c6cb47bc0
commit
d4de52dc35
|
@ -177,7 +177,7 @@ const ACL: Record<string, Set<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" || process.env.BYPASS_ACL) 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