summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-10-07 20:06:09 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-10-07 20:07:35 +1100
commit0e315d27ab309ad4fbc37a4af2c693f4d79a5a5d (patch)
tree8200a4fd40463219c068fa8d9b801707d4916741 /src
parentfix self_edit_guilds right (diff)
downloadserver-0e315d27ab309ad4fbc37a4af2c693f4d79a5a5d.tar.xz
remove self_edit_guilds, was dumb
Diffstat (limited to 'src')
-rw-r--r--src/api/routes/guilds/#guild_id/index.ts4
-rw-r--r--src/util/entities/Config.ts2
-rw-r--r--src/util/util/Rights.ts1
3 files changed, 3 insertions, 4 deletions
diff --git a/src/api/routes/guilds/#guild_id/index.ts b/src/api/routes/guilds/#guild_id/index.ts
index ca7de430..fb3589cb 100644
--- a/src/api/routes/guilds/#guild_id/index.ts
+++ b/src/api/routes/guilds/#guild_id/index.ts
@@ -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({
diff --git a/src/util/entities/Config.ts b/src/util/entities/Config.ts
index 2b75a049..5035f552 100644
--- a/src/util/entities/Config.ts
+++ b/src/util/entities/Config.ts
@@ -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,
diff --git a/src/util/util/Rights.ts b/src/util/util/Rights.ts
index d6e539c0..6ba06d0e 100644
--- a/src/util/util/Rights.ts
+++ b/src/util/util/Rights.ts
@@ -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) {