From a777b0a9babc86e022c264b0bba641c4fcc47e8c Mon Sep 17 00:00:00 2001 From: Kenia <19161242+kaxcode@users.noreply.github.com> Date: Wed, 25 Aug 2021 09:42:05 -0400 Subject: [PATCH] ui: Disabling policy form fields from users with 'read' permissions (#10902) --- .changelog/10902.txt | 3 +++ ui/packages/consul-ui/app/abilities/policy.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .changelog/10902.txt diff --git a/.changelog/10902.txt b/.changelog/10902.txt new file mode 100644 index 0000000000..fd346bbe45 --- /dev/null +++ b/.changelog/10902.txt @@ -0,0 +1,3 @@ +```release-note:bug +ui: Disabling policy form fields from users with 'read' permissions +``` \ No newline at end of file diff --git a/ui/packages/consul-ui/app/abilities/policy.js b/ui/packages/consul-ui/app/abilities/policy.js index 739408a187..26e310dbfb 100644 --- a/ui/packages/consul-ui/app/abilities/policy.js +++ b/ui/packages/consul-ui/app/abilities/policy.js @@ -16,7 +16,7 @@ export default class PolicyAbility extends BaseAbility { return ( this.env.var('CONSUL_ACLS_ENABLED') && (typeof this.item === 'undefined' || typeOf([this.item]) !== 'policy-management') && - super.canRead + super.canWrite ); }