1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-05 10:22:31 +01:00

remove self_edit_guilds, was dumb

This commit is contained in:
Madeline 2022-10-07 20:06:09 +11:00
parent 9340753ca0
commit 67a8c0d445
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47
4 changed files with 3 additions and 5 deletions

View File

@ -7,7 +7,6 @@ console.log(`All rights:`, allRights);
var discordLike = allRights;
discordLike -= Rights.FLAGS.OPERATOR;
discordLike -= Rights.FLAGS.MANAGE_APPLICATIONS;
discordLike -= Rights.FLAGS.MANAGE_GUILDS;
discordLike -= Rights.FLAGS.MANAGE_MESSAGES;
discordLike -= Rights.FLAGS.MANAGE_RATE_LIMITS;
discordLike -= Rights.FLAGS.MANAGE_ROUTING;

View File

@ -44,9 +44,9 @@ router.patch(
const rights = await getRights(req.user_id);
const permission = await getPermission(req.user_id, guild_id);
if (!rights.has("SELF_EDIT_GUILDS") && !permission.has("MANAGE_GUILD"))
if (!rights.has("MANAGE_GUILDS") && !permission.has("MANAGE_GUILD"))
throw DiscordApiErrors.MISSING_PERMISSIONS.withParams(
"SELF_EDIT_GUILDS",
"MANAGE_GUILDS",
);
var guild = await Guild.findOneOrFail({

View File

@ -326,7 +326,7 @@ export const DefaultConfigOptions: ConfigValue = {
},
ipdataApiKey:
"eca677b284b3bac29eb72f5e496aa9047f26543605efe99ff2ce35c9",
defaultRights: "30644591655936", // See util/scripts/rights.js
defaultRights: "30644591655940", // See `npm run generate:rights`
},
login: {
requireCaptcha: false,

View File

@ -78,7 +78,6 @@ export class Rights extends BitField {
SEND_BACKDATED_EVENTS: BitFlag(42), // can send backdated events
USE_MASS_INVITES: BitFlag(43), // added per @xnacly's request — can accept mass invites
ACCEPT_INVITES: BitFlag(44), // added per @xnacly's request — can accept user-specific invites and DM requests
SELF_EDIT_GUILDS: BitFlag(45), // Edit guilds you own or have permission to edit
};
any(permission: RightResolvable, checkOperator = true) {