fix(api): enforce scoped perms, age gates, audit logs (#2076)

This commit is contained in:
Hampus authored and GitHub committed 2026-08-29 14:55:13 +02:00
1 parent f2ea10f951
commit cf7ec06d85
14 files changed
+228 -49

No files matched your search

@@ -37,8 +37,11 @@ export class GuildMemberAuthService {
if (!canManage) throw new MissingPermissionsError();
};
const getMyPermissions = async () => this.gatewayService.getUserPermissions({guildId, userId});
const hasPermission = async (permission: bigint) =>
this.gatewayService.checkPermission({guildId, userId, permission});
const hasPermission = async (permission: bigint) => {
const allowed = await this.gatewayService.checkPermission({guildId, userId, permission});
if (allowed) enforceGuildMfa(permission);
return allowed;
};
const canManageRoles = async (targetUserId: UserID, targetRoleId: RoleID) =>
this.gatewayService.canManageRoles({guildId, userId, targetUserId, roleId: targetRoleId});
return {