summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/api/routes/auth/generate-registration-tokens.ts2
-rw-r--r--src/util/util/Rights.ts1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/api/routes/auth/generate-registration-tokens.ts b/src/api/routes/auth/generate-registration-tokens.ts
index 80fdaed1..50c389e0 100644
--- a/src/api/routes/auth/generate-registration-tokens.ts
+++ b/src/api/routes/auth/generate-registration-tokens.ts
@@ -38,7 +38,7 @@ router.get(
 					"The length of each registration token. Defaults to 255.",
 			},
 		},
-		right: "OPERATOR",
+		right: "CREATE_REGISTRATION_TOKENS",
 		responses: { 200: { body: "GenerateRegistrationTokensResponse" } },
 	}),
 	async (req: Request, res: Response) => {
diff --git a/src/util/util/Rights.ts b/src/util/util/Rights.ts
index 90ebe242..56d0e28d 100644
--- a/src/util/util/Rights.ts
+++ b/src/util/util/Rights.ts
@@ -94,6 +94,7 @@ export class Rights extends BitField {
 		MANAGE_GROUPS: BitFlag(47), // can manage others' groups
 		VIEW_SERVER_STATS: BitFlag(48), // added per @chrischrome's request — can view server stats)
 		RESEND_VERIFICATION_EMAIL: BitFlag(49), // can resend verification emails (/auth/verify/resend)
+		CREATE_REGISTRATION_TOKENS: BitFlag(50), // can create registration tokens (/auth/generate-registration-tokens)
 	};
 
 	any(permission: RightResolvable, checkOperator = true) {