mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 13:35:42 +09:00
fix(api): enforce scoped perms, age gates, audit logs (#2076)
This commit is contained in:
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 {
|
||||
|
||||
Reference in new issue
Block a user