mirror of
https://github.com/ansible/awx.git
synced 2026-05-24 17:17:45 -02:30
This commit is contained in:
@@ -178,6 +178,8 @@ export function CredentialsAdd($scope, $rootScope, $compile, $location, $log,
|
||||
|
||||
$scope.canShareCredential = false;
|
||||
|
||||
$rootScope.$watch('current_user', function(){
|
||||
try {
|
||||
if ($rootScope.current_user.is_superuser) {
|
||||
$scope.canShareCredential = true;
|
||||
} else {
|
||||
@@ -205,6 +207,11 @@ export function CredentialsAdd($scope, $rootScope, $compile, $location, $log,
|
||||
input_type: 'radio',
|
||||
autopopulateLookup: false
|
||||
});
|
||||
}
|
||||
catch(err){
|
||||
// $rootScope.current_user isn't available because a call to the config endpoint hasn't finished resolving yet
|
||||
}
|
||||
});
|
||||
|
||||
if (!Empty($stateParams.user_id)) {
|
||||
// Get the username based on incoming route
|
||||
|
||||
Reference in New Issue
Block a user