|
@ -27,7 +27,8 @@ import { CreateOrUpdateAccessDialog } from './create-or-update-access-dialog/cre |
|
|
templateUrl: './user-account-access.html' |
|
|
templateUrl: './user-account-access.html' |
|
|
}) |
|
|
}) |
|
|
export class UserAccountAccessComponent implements OnDestroy, OnInit { |
|
|
export class UserAccountAccessComponent implements OnDestroy, OnInit { |
|
|
public accesses: Access[]; |
|
|
public accessesGet: Access[]; |
|
|
|
|
|
public accessesGive: Access[]; |
|
|
public deviceType: string; |
|
|
public deviceType: string; |
|
|
public hasPermissionToCreateAccess: boolean; |
|
|
public hasPermissionToCreateAccess: boolean; |
|
|
public hasPermissionToDeleteAccess: boolean; |
|
|
public hasPermissionToDeleteAccess: boolean; |
|
@ -125,11 +126,21 @@ export class UserAccountAccessComponent implements OnDestroy, OnInit { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private update() { |
|
|
private update() { |
|
|
|
|
|
this.accessesGet = this.user.access.map(({ alias, id, permissions }) => { |
|
|
|
|
|
return { |
|
|
|
|
|
alias, |
|
|
|
|
|
id, |
|
|
|
|
|
permissions, |
|
|
|
|
|
grantee: $localize`Me`, |
|
|
|
|
|
type: 'PRIVATE' |
|
|
|
|
|
}; |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
this.dataService |
|
|
this.dataService |
|
|
.fetchAccesses() |
|
|
.fetchAccesses() |
|
|
.pipe(takeUntil(this.unsubscribeSubject)) |
|
|
.pipe(takeUntil(this.unsubscribeSubject)) |
|
|
.subscribe((accesses) => { |
|
|
.subscribe((accesses) => { |
|
|
this.accesses = accesses; |
|
|
this.accessesGive = accesses; |
|
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
this.changeDetectorRef.markForCheck(); |
|
|
}); |
|
|
}); |
|
|