diff --git a/.changelog/11520.txt b/.changelog/11520.txt new file mode 100644 index 0000000000..d8532bc6c6 --- /dev/null +++ b/.changelog/11520.txt @@ -0,0 +1,4 @@ +```release-note:bug +ui: Revert to depending on the backend, 'post-user-action', to report +permissions errors rather than using UI capabilities 'pre-user-action' +``` diff --git a/ui/packages/consul-ui/app/services/repository/permission.js b/ui/packages/consul-ui/app/services/repository/permission.js index 66f30f5da9..dd87209ae9 100644 --- a/ui/packages/consul-ui/app/services/repository/permission.js +++ b/ui/packages/consul-ui/app/services/repository/permission.js @@ -148,6 +148,18 @@ export default class PermissionService extends RepositoryService { async findAll(params) { params.resources = REQUIRED_PERMISSIONS; this.permissions = await this.findByPermissions(params); + /**/ + // Temporarily revert to pre-1.10 UI functionality by overwriting frontend + // permissions. These are used to hide certain UI elements, but they are + // still enforced on the backend. + // 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)) { + item.Allow = true; + } + }) + /**/ return this.permissions; } }