mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 15:21:13 +03:00
hide run commands for related host, groups nested hosts lists if user does not have permission
This commit is contained in:
parent
c2e8200c81
commit
813a66cafe
@ -6,10 +6,10 @@
|
||||
|
||||
export default ['$scope', 'NestedHostsListDefinition', '$rootScope', 'GetBasePath',
|
||||
'rbacUiControlService', 'Dataset', '$state', '$filter', 'Prompt', 'Wait',
|
||||
'HostsService', 'SetStatus', 'canAdd', 'GroupsService', 'ProcessErrors', 'groupData',
|
||||
'HostsService', 'SetStatus', 'canAdd', 'GroupsService', 'ProcessErrors', 'groupData', 'inventoryData',
|
||||
function($scope, NestedHostsListDefinition, $rootScope, GetBasePath,
|
||||
rbacUiControlService, Dataset, $state, $filter, Prompt, Wait,
|
||||
HostsService, SetStatus, canAdd, GroupsService, ProcessErrors, groupData) {
|
||||
HostsService, SetStatus, canAdd, GroupsService, ProcessErrors, groupData, inventoryData) {
|
||||
|
||||
let list = NestedHostsListDefinition;
|
||||
|
||||
@ -25,6 +25,8 @@ export default ['$scope', 'NestedHostsListDefinition', '$rootScope', 'GetBasePat
|
||||
$scope[`${list.iterator}_dataset`] = Dataset.data;
|
||||
$scope[list.name] = $scope[`${list.iterator}_dataset`].results;
|
||||
|
||||
$scope.inventory_obj = inventoryData;
|
||||
|
||||
$rootScope.flashMessage = null;
|
||||
|
||||
$scope.$watchCollection(list.name, function() {
|
||||
|
@ -102,7 +102,7 @@ export default ['i18n', function(i18n) {
|
||||
showTipWhenDisabled: true,
|
||||
tooltipInnerClass: "Tooltip-wide",
|
||||
// TODO: we don't always want to show this
|
||||
ngShow: true
|
||||
ngShow: 'inventory_obj.summary_fields.user_capabilities.adhoc'
|
||||
},
|
||||
refresh: {
|
||||
mode: 'all',
|
||||
|
@ -115,7 +115,7 @@ export default ['i18n', function(i18n) {
|
||||
showTipWhenDisabled: true,
|
||||
tooltipInnerClass: "Tooltip-wide",
|
||||
// TODO: we don't always want to show this
|
||||
ngShow: true
|
||||
ngShow: 'inventory_obj.summary_fields.user_capabilities.adhoc'
|
||||
},
|
||||
create: {
|
||||
mode: 'all',
|
||||
|
Loading…
Reference in New Issue
Block a user