|
@@ -13,6 +13,7 @@ function (angular) {
|
|
|
$scope.init = function() {
|
|
$scope.init = function() {
|
|
|
if ($routeParams.id) {
|
|
if ($routeParams.id) {
|
|
|
$scope.getUser($routeParams.id);
|
|
$scope.getUser($routeParams.id);
|
|
|
|
|
+ $scope.getUserOrgs($routeParams.id);
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -49,6 +50,12 @@ function (angular) {
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ $scope.getUserOrgs = function(id) {
|
|
|
|
|
+ backendSrv.get('/api/users/' + id + '/orgs').then(function(orgs) {
|
|
|
|
|
+ $scope.orgs = orgs;
|
|
|
|
|
+ });
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
$scope.update = function() {
|
|
$scope.update = function() {
|
|
|
if (!$scope.userForm.$valid) { return; }
|
|
if (!$scope.userForm.$valid) { return; }
|
|
|
|
|
|