feat: 🎸 add grant_scope_ids to role model (#2308)
* feat: 🎸 add grant_scope_ids to role model ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12709 * refactor: 💡 remove removeGrantScopes method ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12709 * style: 💄 add braces around if statement ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12709
This commit is contained in:
1 parent
c0cecda312
commit
f9e85aa9aa
5 files changed
+123
-6
No files matched your search
@@ -74,6 +74,20 @@ export default class RoleModel extends GeneratedRoleModel {
|
||||
|
||||
// =methods
|
||||
|
||||
/**
|
||||
* Saves grant scope ids on the role via the `set-grant-scopes` method.
|
||||
* @param {[string]} grantScopeIDs
|
||||
* @return {Promise}
|
||||
*/
|
||||
setGrantScopes(grantScopeIDs) {
|
||||
return this.save({
|
||||
adapterOptions: {
|
||||
method: 'set-grant-scopes',
|
||||
grantScopeIDs,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves grant strings on the role via the `set-grants` method.
|
||||
* See serializer and adapter for more information.
|
||||
|
||||
Reference in new issue
Block a user