mirror of https://github.com/status-im/consul.git
ui: Temporarily force all UI capabilities (#11520)
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 commit is contained in:
parent
00b5b0a0a2
commit
aeaa0a6c96
|
@ -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'
|
||||
```
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue