Adding right to delete pending creation.

This commit is contained in:
elweyn 2021-12-30 14:00:53 +01:00
parent e440bb10b7
commit 2f59ecae50
2 changed files with 2 additions and 0 deletions

View File

@ -24,4 +24,5 @@ export enum RIGHTS {
CREATE_PENDING_CREATION = 'CREATE_PENDING_CREATION',
UPDATE_PENDING_CREATION = 'UPDATE_PENDING_CREATION',
SEARCH_PENDING_CREATION = 'SEARCH_PENDING_CREATION',
DELETE_PENDING_CREATION = 'DELETE_PENDING_CREATION',
}

View File

@ -151,6 +151,7 @@ export class AdminResolver {
return pendingCreationsPromise.reverse()
}
@Authorized([RIGHTS.DELETE_PENDING_CREATION])
@Mutation(() => Boolean)
async deletePendingCreation(@Arg('id') id: number): Promise<boolean> {
const loginPendingTasksAdminRepository = getCustomRepository(LoginPendingTasksAdminRepository)