GUAC-800: Display user attributes within user editor.

This commit is contained in:
Michael Jumper
2015-05-26 14:22:16 -07:00
parent c8c12663b3
commit e31025273a
3 changed files with 86 additions and 2 deletions

View File

@@ -39,6 +39,7 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto
var guacNotification = $injector.get('guacNotification');
var userService = $injector.get('userService');
var permissionService = $injector.get('permissionService');
var schemaService = $injector.get('schemaService');
/**
* An action to be provided along with the object sent to showStatus which
@@ -102,6 +103,14 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto
*/
$scope.permissions = null;
/**
* All available user attributes. This is only the set of attribute
* definitions, not attribute values.
*
* @type Field[]
*/
$scope.attributes = null;
/**
* Returns whether critical data has completed being loaded.
*
@@ -115,11 +124,17 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto
&& $scope.permissionFlags !== null
&& $scope.rootGroup !== null
&& $scope.permissions !== null
&& $scope.attributes !== null
&& $scope.canSaveUser !== null
&& $scope.canDeleteUser !== null;
};
// Pull user attribute schema
schemaService.getUserAttributes().success(function attributesReceived(attributes) {
$scope.attributes = attributes;
});
// Pull user data
userService.getUser(username).success(function userReceived(user) {
$scope.user = user;