You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/ui/packages/consul-ui/app/abilities/kv.js

14 lines
380 B

import BaseAbility, { ACCESS_LIST } from './base';
export default class KVAbility extends BaseAbility {
resource = 'key';
generateForSegment(segment) {
let resources = super.generateForSegment(segment);
if (segment.endsWith('/')) {
resources = resources.concat(this.permissions.generate(this.resource, ACCESS_LIST, segment));
}
return resources;
}
}