]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/models/users/user-role.ts
Merge branch 'release/2.1.0' into develop
[github/Chocobozzz/PeerTube.git] / shared / models / users / user-role.ts
index 0b6554e5160cf4d470473d6b8ec3121c95e83ef3..ae3a0d983ea294ce9fe3deb7663b6f82352f9be8 100644 (file)
@@ -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
   ],