Merge pull request #5678 from jaredevantabor/read-role

filtering out READ roles from the RBAC modal
This commit is contained in:
Jared Tabor 2017-03-13 10:58:49 -07:00 committed by GitHub
commit 7019cb9b5a
2 changed files with 3 additions and 2 deletions

View File

@ -18,7 +18,9 @@ export default ['$rootScope', '$scope', 'GetBasePath', 'Rest', '$q', 'Wait', 'Pr
// the object permissions are being added to
scope.object = scope.resourceData.data;
// array for all possible roles for the object
scope.roles = scope.object.summary_fields.object_roles;
scope.roles = _.omit(scope.object.summary_fields.object_roles, (key) => {
return key.name === 'Read';
});
// TODO: get working with api
// array w roles and descriptions for key

View File

@ -16,7 +16,6 @@ export default
roles: '=',
model: '='
},
// @issue why is the read-only role ommited from this selection?
template: '<select ng-cloak class="AddPermissions-selectHide roleSelect2 form-control" ng-model="model" ng-options="role.name for role in roles track by role.id" multiple required></select>',
link: function(scope, element, attrs, ctrl) {
CreateSelect2({