mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
Fixed permission page issues.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
function PermissionsList ($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, PermissionList,
|
function PermissionsList ($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, PermissionList,
|
||||||
GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller,
|
GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller,
|
||||||
ClearScope, ProcessErrors, GetBasePath)
|
ClearScope, ProcessErrors, GetBasePath, CheckAccess)
|
||||||
{
|
{
|
||||||
ClearScope('htmlTemplate'); //Garbage collection. Don't leave behind any listeners/watchers from the prior
|
ClearScope('htmlTemplate'); //Garbage collection. Don't leave behind any listeners/watchers from the prior
|
||||||
//scope.
|
//scope.
|
||||||
@@ -22,13 +22,13 @@ function PermissionsList ($scope, $rootScope, $location, $log, $routeParams, Res
|
|||||||
LoadBreadCrumbs();
|
LoadBreadCrumbs();
|
||||||
|
|
||||||
scope.addPermission = function() {
|
scope.addPermission = function() {
|
||||||
if (checkAccess()) {
|
if (CheckAccess()) {
|
||||||
$location.path($location.path() + '/add');
|
$location.path($location.path() + '/add');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
scope.editPermission = function(id) {
|
scope.editPermission = function(id) {
|
||||||
if (checkAccess()) {
|
if (CheckAccess()) {
|
||||||
$location.path($location.path() + '/' + id);
|
$location.path($location.path() + '/' + id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -60,7 +60,7 @@ function PermissionsList ($scope, $rootScope, $location, $log, $routeParams, Res
|
|||||||
|
|
||||||
PermissionsList.$inject = [ '$scope', '$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'PermissionList',
|
PermissionsList.$inject = [ '$scope', '$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'PermissionList',
|
||||||
'GenerateList', 'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller',
|
'GenerateList', 'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller',
|
||||||
'ClearScope', 'ProcessErrors', 'GetBasePath'
|
'ClearScope', 'ProcessErrors', 'GetBasePath', 'CheckAccess'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -126,17 +126,20 @@ angular.module('TeamFormDefinition', [])
|
|||||||
label: 'Name',
|
label: 'Name',
|
||||||
ngClick: "edit('permissions', \{\{ permission.id \}\}, '\{\{ permission.name \}\}')"
|
ngClick: "edit('permissions', \{\{ permission.id \}\}, '\{\{ permission.name \}\}')"
|
||||||
},
|
},
|
||||||
|
inventory: {
|
||||||
|
label: 'Inventory',
|
||||||
|
sourceModel: 'inventory',
|
||||||
|
sourceField: 'name',
|
||||||
|
ngBind: 'permission.summary_fields.inventory.name',
|
||||||
|
},
|
||||||
project: {
|
project: {
|
||||||
label: 'Project',
|
label: 'Project',
|
||||||
sourceModel: 'project',
|
sourceModel: 'project',
|
||||||
sourceField: 'name',
|
sourceField: 'name',
|
||||||
ngBind: 'permission.summary_fields.project.name',
|
ngBind: 'permission.summary_fields.project.name',
|
||||||
},
|
},
|
||||||
inventory: {
|
permission_type: {
|
||||||
label: 'Inventory',
|
label: 'Permission'
|
||||||
sourceModel: 'inventory',
|
|
||||||
sourceField: 'name',
|
|
||||||
ngBind: 'permission.summary_fields.inventory.name',
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -163,18 +163,22 @@ angular.module('UserFormDefinition', [])
|
|||||||
label: 'Name',
|
label: 'Name',
|
||||||
ngClick: "edit('permissions', \{\{ permission.id \}\}, '\{\{ permission.name \}\}')"
|
ngClick: "edit('permissions', \{\{ permission.id \}\}, '\{\{ permission.name \}\}')"
|
||||||
},
|
},
|
||||||
|
inventory: {
|
||||||
|
label: 'Inventory',
|
||||||
|
sourceModel: 'inventory',
|
||||||
|
sourceField: 'name',
|
||||||
|
ngBind: 'permission.summary_fields.inventory.name',
|
||||||
|
},
|
||||||
project: {
|
project: {
|
||||||
label: 'Project',
|
label: 'Project',
|
||||||
sourceModel: 'project',
|
sourceModel: 'project',
|
||||||
sourceField: 'name',
|
sourceField: 'name',
|
||||||
ngBind: 'permission.summary_fields.project.name',
|
ngBind: 'permission.summary_fields.project.name',
|
||||||
},
|
},
|
||||||
inventory: {
|
permission_type: {
|
||||||
label: 'Inventory',
|
label: 'Permission'
|
||||||
sourceModel: 'inventory',
|
|
||||||
sourceField: 'name',
|
|
||||||
ngBind: 'permission.summary_fields.inventory.name',
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
fieldActions: {
|
fieldActions: {
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ angular.module('RelatedSearchHelper', ['RestServices', 'Utilities','RefreshRelat
|
|||||||
|
|
||||||
for (var related in form.related) {
|
for (var related in form.related) {
|
||||||
if ( form.related[related].iterator == iterator ) {
|
if ( form.related[related].iterator == iterator ) {
|
||||||
var f = form.related[set].fields[fld];
|
var f = form.related[related].fields[fld];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,15 +71,15 @@ angular.module('RelatedSearchHelper', ['RestServices', 'Utilities','RefreshRelat
|
|||||||
scope[iterator + 'HideSearchType'] = false;
|
scope[iterator + 'HideSearchType'] = false;
|
||||||
scope[iterator + 'InputHide'] = false;
|
scope[iterator + 'InputHide'] = false;
|
||||||
|
|
||||||
if (f.searchType && f.searchType == 'gtzero') {
|
if (f.searchType !== undefined && f.searchType == 'gtzero') {
|
||||||
scope[iterator + "InputHide"] = true;
|
scope[iterator + "InputHide"] = true;
|
||||||
}
|
}
|
||||||
if (f.searchType && (f.searchType == 'boolean'
|
if (f.searchType !== undefined && (f.searchType == 'boolean'
|
||||||
|| f.searchType == 'select')) {
|
|| f.searchType == 'select')) {
|
||||||
scope[iterator + 'SelectShow'] = true;
|
scope[iterator + 'SelectShow'] = true;
|
||||||
scope[iterator + 'SearchSelectOpts'] = f.searchOptions;
|
scope[iterator + 'SearchSelectOpts'] = f.searchOptions;
|
||||||
}
|
}
|
||||||
if (f.searchType && f.searchType == 'int') {
|
if (f.searchType !== undefined && f.searchType == 'int') {
|
||||||
scope[iterator + 'HideSearchType'] = true;
|
scope[iterator + 'HideSearchType'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,11 @@ angular.module('PermissionListDefinition', [])
|
|||||||
label: 'Name',
|
label: 'Name',
|
||||||
ngClick: 'editPermission(\{\{ permission.id \}\})'
|
ngClick: 'editPermission(\{\{ permission.id \}\})'
|
||||||
},
|
},
|
||||||
description: {
|
inventory: {
|
||||||
label: 'Description'
|
label: 'Inventory',
|
||||||
|
sourceModel: 'inventory',
|
||||||
|
sourceField: 'name',
|
||||||
|
ngBind: 'permission.summary_fields.inventory.name'
|
||||||
},
|
},
|
||||||
project: {
|
project: {
|
||||||
label: 'Project',
|
label: 'Project',
|
||||||
@@ -33,12 +36,9 @@ angular.module('PermissionListDefinition', [])
|
|||||||
sourceField: 'name',
|
sourceField: 'name',
|
||||||
ngBind: 'permission.summary_fields.project.name'
|
ngBind: 'permission.summary_fields.project.name'
|
||||||
},
|
},
|
||||||
inventory: {
|
permission_type: {
|
||||||
label: 'Inventory',
|
label: 'Permission'
|
||||||
sourceModel: 'inventory',
|
}
|
||||||
sourceField: 'name',
|
|
||||||
ngBind: 'permission.summary_fields.inventory.name'
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
|||||||
Reference in New Issue
Block a user