Add rights and roles to query admins and moderators.

This commit is contained in:
elweyn 2022-08-10 11:27:05 +02:00
parent f95831d6a0
commit d0d4b151dc
2 changed files with 2 additions and 0 deletions

View File

@ -30,6 +30,7 @@ export enum RIGHTS {
LIST_CONTRIBUTIONS = 'LIST_CONTRIBUTIONS',
LIST_ALL_CONTRIBUTIONS = 'LIST_ALL_CONTRIBUTIONS',
UPDATE_CONTRIBUTION = 'UPDATE_CONTRIBUTION',
SEARCH_ADMIN_USERS = 'SEARCH_ADMIN_USERS',
// Admin
SEARCH_USERS = 'SEARCH_USERS',
SET_USER_ROLE = 'SET_USER_ROLE',

View File

@ -28,6 +28,7 @@ export const ROLE_USER = new Role('user', [
RIGHTS.LIST_CONTRIBUTIONS,
RIGHTS.LIST_ALL_CONTRIBUTIONS,
RIGHTS.UPDATE_CONTRIBUTION,
RIGHTS.SEARCH_ADMIN_USERS,
])
export const ROLE_ADMIN = new Role('admin', Object.values(RIGHTS)) // all rights