From e271a69efb25a6612b692209743c204635260ea5 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 3 Jul 2018 14:00:38 -0400 Subject: [PATCH] Don't filter out read role. --- .../src/access/add-rbac-resource/rbac-resource.controller.js | 4 +--- .../src/access/add-rbac-resource/rbac-resource.partial.html | 2 +- .../access/add-rbac-user-team/rbac-user-team.controller.js | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/awx/ui/client/src/access/add-rbac-resource/rbac-resource.controller.js b/awx/ui/client/src/access/add-rbac-resource/rbac-resource.controller.js index 450ab9c997..c0656ebf79 100644 --- a/awx/ui/client/src/access/add-rbac-resource/rbac-resource.controller.js +++ b/awx/ui/client/src/access/add-rbac-resource/rbac-resource.controller.js @@ -25,9 +25,7 @@ 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 = _.omit(scope.object.summary_fields.object_roles, (key) => { - return key.name === 'Read'; - }); + scope.roles = scope.object.summary_fields.object_roles; // TODO: get working with api // array w roles and descriptions for key diff --git a/awx/ui/client/src/access/add-rbac-resource/rbac-resource.partial.html b/awx/ui/client/src/access/add-rbac-resource/rbac-resource.partial.html index a01030455b..46b50b6e06 100644 --- a/awx/ui/client/src/access/add-rbac-resource/rbac-resource.partial.html +++ b/awx/ui/client/src/access/add-rbac-resource/rbac-resource.partial.html @@ -67,7 +67,7 @@
+ ng-repeat="key in roleKey">
{{ key.name }}
diff --git a/awx/ui/client/src/access/add-rbac-user-team/rbac-user-team.controller.js b/awx/ui/client/src/access/add-rbac-user-team/rbac-user-team.controller.js index fb1f7b20db..7c1f53cc4c 100644 --- a/awx/ui/client/src/access/add-rbac-user-team/rbac-user-team.controller.js +++ b/awx/ui/client/src/access/add-rbac-user-team/rbac-user-team.controller.js @@ -78,7 +78,7 @@ function(scope, $state, i18n, CreateSelect2, Rest, $q, Wait, ProcessErrors) { // aggregate name/descriptions for each available role, based on resource type // reasoning: function aggregateKey(item, type){ - _.merge(scope.keys[type], _.omit(item.summary_fields.object_roles, 'read_role')); + _.merge(scope.keys[type], item.summary_fields.object_roles); } scope.closeModal = function() {