File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { TranslateService } from '@ngx-translate/core';
88import { UserService } from '../user.service' ;
99import { Subscription } from 'rxjs' ;
1010import { Location } from '@angular/common' ;
11+ import { PermissionType } from '@app/admin/permission/permission.model' ;
1112
1213
1314@Component ( {
@@ -58,7 +59,7 @@ export class UserEditComponent implements OnInit {
5859 this . user . email = response . email ;
5960 this . user . id = response . id ;
6061 this . user . active = response . active ;
61- this . user . globalAdmin = response . globalAdmin ;
62+ this . user . globalAdmin = response . permissions . some ( x => x . type == PermissionType . GlobalAdmin ) ;
6263 // We cannot set the password.
6364 } ) ;
6465 }
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ export interface UserResponse {
1818 active : boolean ;
1919 lastLogin : Date ;
2020 permissions : PermissionResponse [ ] ;
21- globalAdmin : boolean ;
2221}
2322
2423export interface UserGetManyResponse {
You can’t perform that action at this time.
0 commit comments