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:
Cameron Perera authored and Lisbet Alvarez committed 2024-07-15 17:23:00 -07:00
1 parent c0cecda312
commit f9e85aa9aa
5 files changed
+123 -6

No files matched your search

+14
View File
@@ -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.