forked from administration/panel
fix: better error handling without acl defined
parent
05a33172fd
commit
b38b613c44
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue