feat: 🎸 add No scopes add to roles/role/scopes route (#2338)
* feat: 🎸 add No scopes add to roles/role/scopes route ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13878 * feat: 🎸 add new role ability ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13878 * refactor: 💡 fix permission for setting grant scopes on role ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13878
This commit is contained in:
1 parent
2bc314d271
commit
85bce84356
9 files changed
+67
-7
No files matched your search
@@ -75,4 +75,14 @@ module('Unit | Abilities | Role', function (hooks) {
|
||||
});
|
||||
assert.true(service.can('read account', account));
|
||||
});
|
||||
|
||||
test('can set grant scopes based on authorized_actions', function (assert) {
|
||||
const service = this.owner.lookup('service:can');
|
||||
const model = {
|
||||
authorized_actions: ['set-grant-scopes'],
|
||||
};
|
||||
assert.true(service.can('setGrantScopes role', model));
|
||||
model.authorized_actions = [];
|
||||
assert.false(service.can('setGrantScopes role', model));
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user