mirror of
https://github.com/ansible/awx.git
synced 2026-01-18 21:21:21 -03:30
Fix for filtering organizations, and fixing the org lookup on credentials form
This commit is contained in:
parent
6c7c4061d1
commit
250340e063
@ -43,8 +43,7 @@ export default
|
||||
ngDisabled: '!(credential_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||
},
|
||||
organization: {
|
||||
// interpolated with $rootScope
|
||||
basePath: "{{$rootScope.current_user.is_superuser ? 'api/v1/organizations' : $rootScope.current_user.url + 'admin_of_organizations'}}",
|
||||
basePath: 'organizations',
|
||||
ngShow: 'canShareCredential',
|
||||
label: i18n._('Organization'),
|
||||
type: 'lookup',
|
||||
|
||||
@ -686,10 +686,10 @@ export default ['$injector', '$stateExtender', '$log', function($injector, $stat
|
||||
interpolator = $interpolate(list.basePath);
|
||||
path = interpolator({ $rootScope: $rootScope, $stateParams: $stateParams });
|
||||
}
|
||||
// Need to delete the role_level here b/c organizations and inventory scripts
|
||||
// Need to change the role_level here b/c organizations and inventory scripts
|
||||
// don't have a "use_role", only "admin_role" and "read_role"
|
||||
if(list.iterator === "organization" || list.iterator === "inventory_script"){
|
||||
delete $stateParams[`${list.iterator}_search`].role_level;
|
||||
$stateParams[`${list.iterator}_search`].role_level = "admin_role";
|
||||
}
|
||||
return qs.search(path, $stateParams[`${list.iterator}_search`]);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user