mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 15:27:47 -02:30
This commit is contained in:
@@ -178,6 +178,8 @@ export function CredentialsAdd($scope, $rootScope, $compile, $location, $log,
|
|||||||
|
|
||||||
$scope.canShareCredential = false;
|
$scope.canShareCredential = false;
|
||||||
|
|
||||||
|
$rootScope.$watch('current_user', function(){
|
||||||
|
try {
|
||||||
if ($rootScope.current_user.is_superuser) {
|
if ($rootScope.current_user.is_superuser) {
|
||||||
$scope.canShareCredential = true;
|
$scope.canShareCredential = true;
|
||||||
} else {
|
} else {
|
||||||
@@ -205,6 +207,11 @@ export function CredentialsAdd($scope, $rootScope, $compile, $location, $log,
|
|||||||
input_type: 'radio',
|
input_type: 'radio',
|
||||||
autopopulateLookup: false
|
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)) {
|
if (!Empty($stateParams.user_id)) {
|
||||||
// Get the username based on incoming route
|
// Get the username based on incoming route
|
||||||
|
|||||||
Reference in New Issue
Block a user