mirror of
https://github.com/ansible/awx.git
synced 2026-02-19 04:00:06 -03:30
add error handling of admin of org call
This commit is contained in:
@@ -182,6 +182,8 @@ export function CredentialsAdd($scope, $rootScope, $compile, $location, $log,
|
|||||||
Rest.get()
|
Rest.get()
|
||||||
.success(function(data) {
|
.success(function(data) {
|
||||||
$scope.canShareCredential = (data.count) ? true : false;
|
$scope.canShareCredential = (data.count) ? true : false;
|
||||||
|
}).error(function (data, status) {
|
||||||
|
ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to find if users is admin of org' + status });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -342,6 +344,8 @@ export function CredentialsEdit($scope, $rootScope, $compile, $location, $log,
|
|||||||
Rest.get()
|
Rest.get()
|
||||||
.success(function(data) {
|
.success(function(data) {
|
||||||
$scope.canShareCredential = (data.count) ? true : false;
|
$scope.canShareCredential = (data.count) ? true : false;
|
||||||
|
}).error(function (data, status) {
|
||||||
|
ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to find if users is admin of org' + status });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user