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