mirror of
https://github.com/ansible/awx.git
synced 2024-10-30 22:21:13 +03:00
Permissions page -> JT 'Create'
The permissions page, when saved with 'Create' JT permissions wouldn't re-fill the form correctly when the user renavigates to the edit form page for that permission.
This commit is contained in:
parent
ffe0d4a5d0
commit
0d8a2a0d82
@ -142,7 +142,8 @@ function PermissionsAdd($scope, $rootScope, $compile, $location, $log, $routePar
|
|||||||
form: form,
|
form: form,
|
||||||
current_item: null,
|
current_item: null,
|
||||||
list: ProjectList,
|
list: ProjectList,
|
||||||
field: 'project'
|
field: 'project',
|
||||||
|
input_type: 'radio'
|
||||||
});
|
});
|
||||||
|
|
||||||
// Save
|
// Save
|
||||||
@ -246,7 +247,7 @@ function PermissionsEdit($scope, $rootScope, $compile, $location, $log, $routePa
|
|||||||
}
|
}
|
||||||
|
|
||||||
$scope.category = 'Deploy';
|
$scope.category = 'Deploy';
|
||||||
if (data.permission_type !== 'run' && data.permission_type !== 'check') {
|
if (data.permission_type !== 'run' && data.permission_type !== 'check' && data.permission_type !== 'create') {
|
||||||
$scope.category = 'Inventory';
|
$scope.category = 'Inventory';
|
||||||
}
|
}
|
||||||
master.category = $scope.category;
|
master.category = $scope.category;
|
||||||
@ -305,6 +306,9 @@ function PermissionsEdit($scope, $rootScope, $compile, $location, $log, $routePa
|
|||||||
data[fld] = $scope[fld];
|
data[fld] = $scope[fld];
|
||||||
}
|
}
|
||||||
Rest.setUrl(defaultUrl);
|
Rest.setUrl(defaultUrl);
|
||||||
|
if($scope.category === "Inventory"){
|
||||||
|
delete data.project;
|
||||||
|
}
|
||||||
Rest.put(data)
|
Rest.put(data)
|
||||||
.success(function () {
|
.success(function () {
|
||||||
Wait('stop');
|
Wait('stop');
|
||||||
|
Loading…
Reference in New Issue
Block a user