X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fmodels%2Fusers%2Fuser-role.ts;h=d7020c0f2bf5b7a4bd339d51eb66e4fe23058e29;hb=1cd3facc3de899ac864e979cd6d6a704b712cce3;hp=954fa426ecc213e9107a588747d55b0d862d9c1d;hpb=5cd80545422bba855cc9a730a2e13cc9d982c34b;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/models/users/user-role.ts b/shared/models/users/user-role.ts index 954fa426e..d7020c0f2 100644 --- a/shared/models/users/user-role.ts +++ b/shared/models/users/user-role.ts @@ -1,5 +1,4 @@ import { UserRight } from './user-right.enum' -import user from '../../../server/models/account/user' // Keep the order export enum UserRole { @@ -8,7 +7,8 @@ export enum UserRole { USER = 2 } -export const USER_ROLE_LABELS = { +// TODO: use UserRole for key once https://github.com/Microsoft/TypeScript/issues/13042 is fixed +export const USER_ROLE_LABELS: { [ id: number ]: string } = { [UserRole.USER]: 'User', [UserRole.MODERATOR]: 'Moderator', [UserRole.ADMINISTRATOR]: 'Administrator' @@ -24,7 +24,10 @@ const userRoleRights: { [ id: number ]: UserRight[] } = { UserRight.MANAGE_VIDEO_BLACKLIST, UserRight.MANAGE_VIDEO_ABUSES, UserRight.REMOVE_ANY_VIDEO, - UserRight.REMOVE_ANY_VIDEO_CHANNEL + UserRight.REMOVE_ANY_VIDEO_CHANNEL, + UserRight.REMOVE_ANY_VIDEO_COMMENT, + UserRight.UPDATE_ANY_VIDEO, + UserRight.SEE_ALL_VIDEOS ], [UserRole.USER]: []