1
0
Fork 0

fix: better error handling without acl defined

fix-1
Paul Makles 2023-08-05 20:59:19 +01:00
parent 05a33172fd
commit b38b613c44
No known key found for this signature in database
GPG Key ID: 5059F398521BB0F6
1 changed files with 1 additions and 0 deletions

View File

@ -147,6 +147,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") return true;
if (!ACL[email]) throw `user is not registered in system: ${email}`;
const segments = permission.split("/"); const segments = permission.split("/");
while (segments.length) { while (segments.length) {