From ca6d36227a9273f616a462d3aad6a721ab5dd627 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 30 Jan 2020 11:53:38 +0100 Subject: Add url field in caption and use it for thumbnails --- shared/models/users/user-role.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'shared/models/users') diff --git a/shared/models/users/user-role.ts b/shared/models/users/user-role.ts index 0b6554e51..ae3a0d983 100644 --- a/shared/models/users/user-role.ts +++ b/shared/models/users/user-role.ts @@ -7,15 +7,13 @@ export enum UserRole { USER = 2 } -// TODO: use UserRole for key once https://github.com/Microsoft/TypeScript/issues/13042 is fixed -export const USER_ROLE_LABELS: { [ id: number ]: string } = { +export const USER_ROLE_LABELS: { [ id in UserRole ]: string } = { [UserRole.USER]: 'User', [UserRole.MODERATOR]: 'Moderator', [UserRole.ADMINISTRATOR]: 'Administrator' } -// TODO: use UserRole for key once https://github.com/Microsoft/TypeScript/issues/13042 is fixed -const userRoleRights: { [ id: number ]: UserRight[] } = { +const userRoleRights: { [ id in UserRole ]: UserRight[] } = { [UserRole.ADMINISTRATOR]: [ UserRight.ALL ], -- cgit v1.2.3