mirror of
https://github.com/status-im/consul.git
synced 2025-01-13 15:26:48 +00:00
8263879e6f
This commit use the internal authorize endpoint along wiht ember-can to further restrict user access to certain UI features and navigational elements depending on the users ACL token
18 lines
371 B
JavaScript
18 lines
371 B
JavaScript
import BaseAbility from './base';
|
|
import { inject as service } from '@ember/service';
|
|
|
|
export default class NspaceAbility extends BaseAbility {
|
|
@service('env') env;
|
|
|
|
resource = 'operator';
|
|
segmented = false;
|
|
|
|
get canManage() {
|
|
return this.canCreate;
|
|
}
|
|
|
|
get canChoose() {
|
|
return this.env.var('CONSUL_NSPACES_ENABLED') && this.nspaces.length > 0;
|
|
}
|
|
}
|