ui: Check for `intention` ACL resources, not `intentions` ACL resources (#11880)

* ui: Check for `intention` ACL resources, not `intentions` ACL resources

* ui: Flip the test assertion to see the create button temporarily
This commit is contained in:
John Cowen 2021-12-21 06:43:14 +00:00 committed by GitHub
parent 9830867f6c
commit acc7f572fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -155,10 +155,10 @@ export default class PermissionService extends RepositoryService {
// This temporary measure should be removed again once https://github.com/hashicorp/consul/issues/11098
// has been resolved
this.permissions.forEach(item => {
if(['key', 'node', 'service', 'intentions', 'session'].includes(item.Resource)) {
if (['key', 'node', 'service', 'intention', 'session'].includes(item.Resource)) {
item.Allow = true;
}
})
});
/**/
return this.permissions;
}

View File

@ -23,7 +23,12 @@ Feature: dc / intentions / index
dc: dc-1
---
Then the url should be /dc-1/intentions
And I don't see create
And I see create
# We currently hardcode intention write to true until the API does what we need
# Once we can use this as we need we'll be able to un-hardcode And this test
# will fail again, at which point we can remove the above assertion and
# uncomment the below one
# And I don't see create
Scenario: Viewing intentions in the listing live updates
Given 1 datacenter model with the value "dc-1"
Given 3 intention models