Adding right to create pending creation.

This commit is contained in:
elweyn 2021-12-30 13:57:28 +01:00
parent 0d431974bd
commit 6e27c31d3c
2 changed files with 3 additions and 2 deletions

View File

@ -21,4 +21,5 @@ export enum RIGHTS {
HAS_ELOPAGE = 'HAS_ELOPAGE',
// Admin
SEARCH_USERS = 'SEARCH_USERS',
CREATE_PENDING_CREATION = 'CREATE_PENDING_CREATION',
}

View File

@ -42,7 +42,7 @@ export class AdminResolver {
return adminUsers
}
@Authorized([RIGHTS.SEARCH_USERS])
@Authorized([RIGHTS.CREATE_PENDING_CREATION])
@Mutation(() => [Number])
async createPendingCreation(
@Args() { email, amount, memo, creationDate, moderator }: CreatePendingCreationArgs,
@ -67,7 +67,7 @@ export class AdminResolver {
return await getUserCreations(user.id)
}
// @Authorized([RIGHTS.SEARCH_USERS])
@Authorized([RIGHTS.CREATE_PENDING_CREATION])
@Mutation(() => CreatePendingCreations)
async createPendingCreations(
@Arg('pendingCreations', () => [CreatePendingCreationArgs])