From 1e41b9261f0897ce6aef6266db1aac8a7c81c501 Mon Sep 17 00:00:00 2001 From: Michael Bromley Date: Tue, 24 Sep 2019 14:44:22 +0200 Subject: [PATCH] fix(admin-ui): Correctly disable selects/toggles based on permissions --- .../collection-detail.component.html | 2 +- .../facet-detail/facet-detail.component.html | 2 +- .../product-variants-list.component.html | 2 +- .../product-variants-table.component.html | 2 +- .../channel-detail.component.html | 8 +++---- .../country-detail.component.html | 2 +- .../global-settings.component.html | 2 +- .../payment-method-detail.component.html | 4 ++-- .../tax-rate-detail.component.html | 6 ++--- .../configurable-input.component.html | 4 ++-- .../shared/directives/disabled.directive.ts | 24 +++++++++++++++++++ .../admin-ui/src/app/shared/shared.module.ts | 6 +++-- 12 files changed, 45 insertions(+), 19 deletions(-) create mode 100644 packages/admin-ui/src/app/shared/directives/disabled.directive.ts diff --git a/packages/admin-ui/src/app/catalog/components/collection-detail/collection-detail.component.html b/packages/admin-ui/src/app/catalog/components/collection-detail/collection-detail.component.html index ea8dec5f9d..e3f0a7da63 100644 --- a/packages/admin-ui/src/app/catalog/components/collection-detail/collection-detail.component.html +++ b/packages/admin-ui/src/app/catalog/components/collection-detail/collection-detail.component.html @@ -41,7 +41,7 @@ clrToggle formControlName="visible" id="visibility" - [attr.disabled]="!('UpdateCatalog' | hasPermission)" + [vdrDisabled]="!('UpdateCatalog' | hasPermission)" />