mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-19 04:35:25 +00:00
add new right for creating registration tokens
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user