add new right for creating registration tokens

This commit is contained in:
Puyodead1
2023-12-14 22:09:25 -05:00
parent a574284e9f
commit 6a4fd5fbdb
2 changed files with 2 additions and 1 deletions
@@ -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) => {
+1
View File
@@ -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) {