Browse Source
Merge pull request #4778 from deaflynx/edge/fix-manage-device-credentials
Hide Manage credentials for 'edge_customer_user' device scope
pull/4851/head
Igor Kulikov
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
3 additions and
3 deletions
-
ui-ngx/src/app/modules/home/pages/device/device.component.html
-
ui-ngx/src/app/modules/home/pages/device/device.component.ts
-
ui-ngx/src/app/modules/home/pages/device/devices-table-config.resolver.ts
|
|
|
@ -38,7 +38,7 @@ |
|
|
|
[disabled]="(isLoading$ | async)" |
|
|
|
(click)="onEntityAction($event, 'manageCredentials')" |
|
|
|
[fxShow]="!isEdit"> |
|
|
|
{{ (deviceScope === 'customer_user' ? 'device.view-credentials' : 'device.manage-credentials') | translate }} |
|
|
|
{{ ((deviceScope === 'customer_user' || deviceScope === 'edge_customer_user') ? 'device.view-credentials' : 'device.manage-credentials') | translate }} |
|
|
|
</button> |
|
|
|
<button mat-raised-button color="primary" |
|
|
|
[disabled]="(isLoading$ | async)" |
|
|
|
|
|
|
|
@ -48,7 +48,7 @@ export class DeviceComponent extends EntityComponent<DeviceInfo> { |
|
|
|
|
|
|
|
deviceCredentials$: Subject<DeviceCredentials>; |
|
|
|
|
|
|
|
deviceScope: 'tenant' | 'customer' | 'customer_user' | 'edge'; |
|
|
|
deviceScope: 'tenant' | 'customer' | 'customer_user' | 'edge' | 'edge_customer_user'; |
|
|
|
|
|
|
|
otaUpdateType = OtaUpdateType; |
|
|
|
|
|
|
|
|
|
|
|
@ -528,7 +528,7 @@ export class DevicesTableConfigResolver implements Resolve<EntityTableConfig<Dev |
|
|
|
panelClass: ['tb-dialog', 'tb-fullscreen-dialog'], |
|
|
|
data: { |
|
|
|
deviceId: device.id.id, |
|
|
|
isReadOnly: this.config.componentsData.deviceScope === 'customer_user' |
|
|
|
isReadOnly: this.config.componentsData.deviceScope === 'customer_user' || this.config.componentsData.deviceScope === 'edge_customer_user' |
|
|
|
} |
|
|
|
}).afterClosed().subscribe(deviceCredentials => { |
|
|
|
if (isDefinedAndNotNull(deviceCredentials)) { |
|
|
|
|