Commit 15473c040a6f53f65e7892976d44f473263d07f3

Authored by deaflynx
1 parent 854307fd

Hide Manage credentials for edge_customer_user

... ... @@ -38,7 +38,7 @@
38 38 [disabled]="(isLoading$ | async)"
39 39 (click)="onEntityAction($event, 'manageCredentials')"
40 40 [fxShow]="!isEdit">
41   - {{ (deviceScope === 'customer_user' ? 'device.view-credentials' : 'device.manage-credentials') | translate }}
  41 + {{ ((deviceScope === 'customer_user' || deviceScope === 'edge_customer_user') ? 'device.view-credentials' : 'device.manage-credentials') | translate }}
42 42 </button>
43 43 <button mat-raised-button color="primary"
44 44 [disabled]="(isLoading$ | async)"
... ...
... ... @@ -48,7 +48,7 @@ export class DeviceComponent extends EntityComponent<DeviceInfo> {
48 48
49 49 deviceCredentials$: Subject<DeviceCredentials>;
50 50
51   - deviceScope: 'tenant' | 'customer' | 'customer_user' | 'edge';
  51 + deviceScope: 'tenant' | 'customer' | 'customer_user' | 'edge' | 'edge_customer_user';
52 52
53 53 otaUpdateType = OtaUpdateType;
54 54
... ...
... ... @@ -528,7 +528,7 @@ export class DevicesTableConfigResolver implements Resolve<EntityTableConfig<Dev
528 528 panelClass: ['tb-dialog', 'tb-fullscreen-dialog'],
529 529 data: {
530 530 deviceId: device.id.id,
531   - isReadOnly: this.config.componentsData.deviceScope === 'customer_user'
  531 + isReadOnly: this.config.componentsData.deviceScope === 'customer_user' || this.config.componentsData.deviceScope === 'edge_customer_user'
532 532 }
533 533 }).afterClosed().subscribe(deviceCredentials => {
534 534 if (isDefinedAndNotNull(deviceCredentials)) {
... ...