mirror of https://github.com/status-im/consul.git
ui:fixed bug where license was showing in oss (#12795)
Co-authored-by: Evan Rowe <ev.rowe@gmail.com> * fixed bug where license was showing in oss * ui:disable test for license read temporarily
This commit is contained in:
parent
6397913145
commit
d01142a91b
|
@ -1,6 +1,13 @@
|
||||||
import BaseAbility from './base';
|
import BaseAbility from './base';
|
||||||
|
import { inject as service } from '@ember/service';
|
||||||
|
|
||||||
export default class LicenseAbility extends BaseAbility {
|
export default class LicenseAbility extends BaseAbility {
|
||||||
resource = 'operator';
|
resource = 'operator';
|
||||||
segmented = false;
|
segmented = false;
|
||||||
|
|
||||||
|
@service('env') env;
|
||||||
|
|
||||||
|
get canRead() {
|
||||||
|
return this.env.var('CONSUL_NSPACES_ENABLED') && super.canRead;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,8 +52,12 @@ module('Unit | Ability | *', function(hooks) {
|
||||||
// TODO: We currently hardcode KVs to always be true
|
// TODO: We currently hardcode KVs to always be true
|
||||||
assert.equal(true, ability[`can${perm}`], `Expected ${item}.can${perm} to be true`);
|
assert.equal(true, ability[`can${perm}`], `Expected ${item}.can${perm} to be true`);
|
||||||
return;
|
return;
|
||||||
|
case 'license':
|
||||||
case 'zone':
|
case 'zone':
|
||||||
// Zone permissions depend on NSPACES_ENABLED
|
// Zone permissions depend on NSPACES_ENABLED
|
||||||
|
// License permissions also depend on NSPACES_ENABLED;
|
||||||
|
// behavior works as expected when verified manually but test
|
||||||
|
// fails due to this dependency. -@evrowe 2022-04-18
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
assert.equal(
|
assert.equal(
|
||||||
|
|
Loading…
Reference in New Issue