From dcec4398dbb739e2040eda63aea1c3281a9a6a88 Mon Sep 17 00:00:00 2001 From: Allen Wight Date: Thu, 25 Oct 2018 13:35:24 -0400 Subject: [PATCH] Merge pull request #1484 from chalettu/sui-permissions-cleanup BZ# 1642623 - Fix permission related display issues (cherry picked from commit 04236dbc6f5f92201b58bc40f627a47b94004bcf) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1649419 --- .../services/resource-details/resource-details.component.js | 4 +++- client/app/states/catalogs/explorer/explorer.state.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/app/services/resource-details/resource-details.component.js b/client/app/services/resource-details/resource-details.component.js index d22ec757e..5daeef14f 100644 --- a/client/app/services/resource-details/resource-details.component.js +++ b/client/app/services/resource-details/resource-details.component.js @@ -328,7 +328,9 @@ function ComponentController ($state, $stateParams, VmsService, lodash, EventNot } ] snapshotOptionsActions.forEach((menuOption) => menuOption.permission ? snapshotOptionsMenu.actions.push(menuOption) : null) - vm.snapshotListActions = [snapshotOptionsMenu] + if (snapshotOptionsMenu.actions.length) { + vm.snapshotListActions = [snapshotOptionsMenu] + } return vm.snapshotListActions } diff --git a/client/app/states/catalogs/explorer/explorer.state.js b/client/app/states/catalogs/explorer/explorer.state.js index 722ebca57..55fd2ed54 100644 --- a/client/app/states/catalogs/explorer/explorer.state.js +++ b/client/app/states/catalogs/explorer/explorer.state.js @@ -14,7 +14,7 @@ function getStates (RBAC) { controllerAs: 'vm', title: __('Catalogs'), data: { - authorization: RBAC.hasAny(['svc_catalog_provision']) + authorization: RBAC.hasAny(['svc_catalog_provision', 'sui_svc_catalog_view']) } } }