Skip to content

Commit

Permalink
add new right for creating registration tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
Puyodead1 committed Dec 15, 2023
1 parent a574284 commit 6a4fd5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/routes/auth/generate-registration-tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
1 change: 1 addition & 0 deletions src/util/util/Rights.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6a4fd5f

Please sign in to comment.