diff --git a/.changelog/10916.txt b/.changelog/10916.txt new file mode 100644 index 000000000..417aeb917 --- /dev/null +++ b/.changelog/10916.txt @@ -0,0 +1,4 @@ +```release-note:bug +ui: Ignore reported permissions for KV area meaning the KV is always enabled +for both read/write access if the HTTP API allows. +``` diff --git a/ui/packages/consul-ui/app/abilities/kv.js b/ui/packages/consul-ui/app/abilities/kv.js index a13736f2d..2fabf1a48 100644 --- a/ui/packages/consul-ui/app/abilities/kv.js +++ b/ui/packages/consul-ui/app/abilities/kv.js @@ -10,4 +10,15 @@ export default class KVAbility extends BaseAbility { } return resources; } + get canRead() { + return true; + } + + get canList() { + return true; + } + + get canWrite() { + return true; + } } diff --git a/ui/packages/consul-ui/tests/acceptance/dc/acls/tokens/index.feature b/ui/packages/consul-ui/tests/acceptance/dc/acls/tokens/index.feature index 5645f9c47..e588ffc1b 100644 --- a/ui/packages/consul-ui/tests/acceptance/dc/acls/tokens/index.feature +++ b/ui/packages/consul-ui/tests/acceptance/dc/acls/tokens/index.feature @@ -11,6 +11,21 @@ Feature: dc / acls / tokens / index: ACL Token List Then the url should be /dc-1/acls/tokens And the title should be "Tokens - Consul" Then I see 3 token models + Scenario: Viewing tokens with no write access + Given 1 datacenter model with the value "dc-1" + And 3 token models + And permissions from yaml + --- + acl: + write: false + --- + When I visit the tokens page for yaml + --- + dc: dc-1 + --- + Then the url should be /dc-1/acls/tokens + And I don't see create + Scenario: Searching the tokens Given 1 datacenter model with the value "dc-1" And 4 token models from yaml diff --git a/ui/packages/consul-ui/tests/acceptance/dc/kvs/index.feature b/ui/packages/consul-ui/tests/acceptance/dc/kvs/index.feature index e5ef1d280..dafbbf0ed 100644 --- a/ui/packages/consul-ui/tests/acceptance/dc/kvs/index.feature +++ b/ui/packages/consul-ui/tests/acceptance/dc/kvs/index.feature @@ -10,6 +10,7 @@ Feature: dc / kvs / index Then the url should be /dc-1/kv And the title should be "Key / Value - Consul" Then I see 3 kv models + @ignore Scenario: Viewing kvs with no write access Given 1 datacenter model with the value "dc-1" And 3 kv models diff --git a/ui/packages/consul-ui/tests/acceptance/navigation-links.feature b/ui/packages/consul-ui/tests/acceptance/navigation-links.feature index e001d9451..31564f470 100644 --- a/ui/packages/consul-ui/tests/acceptance/navigation-links.feature +++ b/ui/packages/consul-ui/tests/acceptance/navigation-links.feature @@ -16,18 +16,18 @@ Feature: navigation-links: Main Navigation link visibility Allow: true - Resource: key Access: read - Allow: false + Allow: true - Resource: intention Access: read Allow: true - Resource: acl Access: read - Allow: true + Allow: false --- When I visit the services page for yaml --- dc: dc-1 --- Then I see services on the navigation - Then I don't see kvs on the navigation + Then I don't see roles on the navigation