1
0
Fork 0

feat: allow permission bypass via env var

dufisgsd
Lea 2023-08-09 20:02:50 +02:00
parent 7c6cb47bc0
commit d4de52dc35
Signed by: lea
GPG Key ID: 1BAFFE8347019C42
1 changed files with 1 additions and 1 deletions

View File

@ -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("/");