diff options
Diffstat (limited to 'client/src/app/+admin')
3 files changed, 4 insertions, 4 deletions
diff --git a/client/src/app/+admin/overview/users/user-edit/user-edit.ts b/client/src/app/+admin/overview/users/user-edit/user-edit.ts index 5428f6ce9..1edca7fbf 100644 --- a/client/src/app/+admin/overview/users/user-edit/user-edit.ts +++ b/client/src/app/+admin/overview/users/user-edit/user-edit.ts | |||
@@ -49,7 +49,7 @@ export abstract class UserEdit extends FormReactive implements OnInit { | |||
49 | buildRoles () { | 49 | buildRoles () { |
50 | const authUser = this.auth.getUser() | 50 | const authUser = this.auth.getUser() |
51 | 51 | ||
52 | if (authUser.role === UserRole.ADMINISTRATOR) { | 52 | if (authUser.role.id === UserRole.ADMINISTRATOR) { |
53 | this.roles = Object.keys(USER_ROLE_LABELS) | 53 | this.roles = Object.keys(USER_ROLE_LABELS) |
54 | .map(key => ({ value: key.toString(), label: USER_ROLE_LABELS[key] })) | 54 | .map(key => ({ value: key.toString(), label: USER_ROLE_LABELS[key] })) |
55 | return | 55 | return |
diff --git a/client/src/app/+admin/overview/users/user-edit/user-update.component.ts b/client/src/app/+admin/overview/users/user-edit/user-update.component.ts index 71212b19c..25d02f000 100644 --- a/client/src/app/+admin/overview/users/user-edit/user-update.component.ts +++ b/client/src/app/+admin/overview/users/user-edit/user-update.component.ts | |||
@@ -144,7 +144,7 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy { | |||
144 | 144 | ||
145 | this.form.patchValue({ | 145 | this.form.patchValue({ |
146 | email: userJson.email, | 146 | email: userJson.email, |
147 | role: userJson.role.toString(), | 147 | role: userJson.role.id.toString(), |
148 | videoQuota: userJson.videoQuota, | 148 | videoQuota: userJson.videoQuota, |
149 | videoQuotaDaily: userJson.videoQuotaDaily, | 149 | videoQuotaDaily: userJson.videoQuotaDaily, |
150 | pluginAuth: userJson.pluginAuth, | 150 | pluginAuth: userJson.pluginAuth, |
diff --git a/client/src/app/+admin/overview/users/user-list/user-list.component.html b/client/src/app/+admin/overview/users/user-list/user-list.component.html index c7af7dfae..a96ce561c 100644 --- a/client/src/app/+admin/overview/users/user-list/user-list.component.html +++ b/client/src/app/+admin/overview/users/user-list/user-list.component.html | |||
@@ -106,8 +106,8 @@ | |||
106 | </td> | 106 | </td> |
107 | 107 | ||
108 | <td *ngIf="isSelected('role')"> | 108 | <td *ngIf="isSelected('role')"> |
109 | <span *ngIf="user.blocked" class="pt-badge badge-banned" i18n-title title="The user was banned">{{ user.roleLabel }}</span> | 109 | <span *ngIf="user.blocked" class="pt-badge badge-banned" i18n-title title="The user was banned">{{ user.role.label }}</span> |
110 | <span *ngIf="!user.blocked" class="pt-badge" [ngClass]="getRoleClass(user.role)">{{ user.roleLabel }}</span> | 110 | <span *ngIf="!user.blocked" class="pt-badge" [ngClass]="getRoleClass(user.role.id)">{{ user.role.label }}</span> |
111 | </td> | 111 | </td> |
112 | 112 | ||
113 | <td *ngIf="isSelected('email')" [title]="user.email"> | 113 | <td *ngIf="isSelected('email')" [title]="user.email"> |