diff --git a/addons/api/addon/models/role.js b/addons/api/addon/models/role.js index 60edd5ac9..5abb8fd6c 100644 --- a/addons/api/addon/models/role.js +++ b/addons/api/addon/models/role.js @@ -23,6 +23,13 @@ export default class RoleModel extends GeneratedRoleModel { */ @array('string', { readOnly: true }) grant_strings; + /** + * Convenience for looking up the grant scope, if loaded. + */ + get grantScope() { + return this.store.peekRecord('scope', this.grant_scope_id); + } + // =methods /** diff --git a/ui/admin/app/components/form/role/index.hbs b/ui/admin/app/components/form/role/index.hbs index 4c82c77f0..5acbbb603 100644 --- a/ui/admin/app/components/form/role/index.hbs +++ b/ui/admin/app/components/form/role/index.hbs @@ -63,15 +63,16 @@ +
{{/unless}} {{#if (can 'save model' @model)}}