diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-30 13:32:48 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-30 13:32:48 +1000 |
commit | 9886f19d79861e326ba242dee481ed9b91da6994 (patch) | |
tree | 2c746d9662fe6601ef426e818effb7ca88f41884 /src/api/routes/guilds/#guild_id | |
parent | Fix fetching members for roles in POST message (diff) | |
download | server-9886f19d79861e326ba242dee481ed9b91da6994.tar.xz |
Split MANAGE_GUILDS right into MANAGE_GUILDS for instance-wide control and SELF_EDIT_GUILDS for control over guilds you own or have perms to edit
Diffstat (limited to 'src/api/routes/guilds/#guild_id')
-rw-r--r-- | src/api/routes/guilds/#guild_id/index.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/routes/guilds/#guild_id/index.ts b/src/api/routes/guilds/#guild_id/index.ts index d1d67193..c8ee6551 100644 --- a/src/api/routes/guilds/#guild_id/index.ts +++ b/src/api/routes/guilds/#guild_id/index.ts @@ -44,7 +44,7 @@ router.patch( const rights = await getRights(req.user_id); const permission = await getPermission(req.user_id, guild_id); - if (!rights.has("MANAGE_GUILDS") || !permission.has("MANAGE_GUILD")) + if (!rights.has("SELF_EDIT_GUILDS") || !permission.has("MANAGE_GUILD")) throw DiscordApiErrors.MISSING_PERMISSIONS.withParams( "MANAGE_GUILD", ); |