From de305d3901c1e0d3c7e42da0a7dee5255c85b1f8 Mon Sep 17 00:00:00 2001 From: Lea Date: Wed, 9 Aug 2023 21:12:54 +0200 Subject: [PATCH] chore: update ACLs - Added permission to manage badges for user support (mainly to assign the donator badge) - Added `channels/{fetch,create}/dm` for moderation, required for alerts - Removed permission bypass for insert since it shouldn't be needed anymore --- lib/accessPermissions.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/accessPermissions.ts b/lib/accessPermissions.ts index 7e799b7..75b4677 100644 --- a/lib/accessPermissions.ts +++ b/lib/accessPermissions.ts @@ -97,6 +97,7 @@ const PermissionSets = { "users/fetch/by-id", "users/fetch/strikes", "users/fetch/notices", + "users/update/badges", "accounts/fetch/by-id", "accounts/disable", @@ -118,6 +119,8 @@ const PermissionSets = { "messages/fetch/by-id", "channels/fetch/by-id", + "channels/fetch/dm", + "channels/create/dm", "reports/fetch/related/by-user", "reports/fetch/related/by-content", @@ -177,7 +180,7 @@ const ACL: Record> = { }; function hasPermission(email: string, permission: Permission) { - if (email === "insert@revolt.chat" || process.env.BYPASS_ACL) return true; + if (process.env.BYPASS_ACL) return true; if (!ACL[email]) throw `user is not registered in system: ${email}`; const segments = permission.split("/");