diff --git a/guacamole/src/main/webapp/app/navigation/directives/guacUserMenu.js b/guacamole/src/main/webapp/app/navigation/directives/guacUserMenu.js index f94d006c7..0905011bb 100644 --- a/guacamole/src/main/webapp/app/navigation/directives/guacUserMenu.js +++ b/guacamole/src/main/webapp/app/navigation/directives/guacUserMenu.js @@ -47,6 +47,8 @@ angular.module('navigation').directive('guacUserMenu', [function guacUserMenu() var $location = $injector.get('$location'); var $route = $injector.get('$route'); var authenticationService = $injector.get('authenticationService'); + var schemaService = $injector.get('schemaService'); + var userService = $injector.get('userService'); var userPageService = $injector.get('userPageService'); /** @@ -56,6 +58,18 @@ angular.module('navigation').directive('guacUserMenu', [function guacUserMenu() */ $scope.username = authenticationService.getCurrentUsername(); + // Pull user attribute schema + schemaService.getUserAttributes(authenticationService.getDataSource()) + .success(function attributesReceived(attributes) { + $scope.attributes = attributes; + }); + + // Pull user data + userService.getUser(authenticationService.getDataSource(), $scope.username) + .success(function userRetrieved(user) { + $scope.user = user; + }); + /** * The available main pages for the current user. * diff --git a/guacamole/src/main/webapp/app/navigation/navigationModule.js b/guacamole/src/main/webapp/app/navigation/navigationModule.js index 332dcb8b7..24c63e3c3 100644 --- a/guacamole/src/main/webapp/app/navigation/navigationModule.js +++ b/guacamole/src/main/webapp/app/navigation/navigationModule.js @@ -22,6 +22,7 @@ */ angular.module('navigation', [ 'auth', + 'form', 'notification', 'rest' ]); diff --git a/guacamole/src/main/webapp/app/navigation/styles/user-menu.css b/guacamole/src/main/webapp/app/navigation/styles/user-menu.css index b7fce98e6..a1ba79720 100644 --- a/guacamole/src/main/webapp/app/navigation/styles/user-menu.css +++ b/guacamole/src/main/webapp/app/navigation/styles/user-menu.css @@ -82,3 +82,15 @@ .user-menu .menu-dropdown .menu-contents li a.logout { background-image: url('images/action-icons/guac-logout-dark.png'); } + +.user-menu .menu-dropdown .menu-contents .profile { + margin: 1em; + padding-bottom: 1em; + border-bottom: 1px solid rgba(0, 0, 0, 0.25); + width: 2in; +} + +.user-menu .menu-dropdown .menu-contents .profile span.field-header, +.user-menu .menu-dropdown .menu-contents .profile h3 { + display: none; +} diff --git a/guacamole/src/main/webapp/app/navigation/templates/guacUserMenu.html b/guacamole/src/main/webapp/app/navigation/templates/guacUserMenu.html index 4ffd937ca..5640b3c85 100644 --- a/guacamole/src/main/webapp/app/navigation/templates/guacUserMenu.html +++ b/guacamole/src/main/webapp/app/navigation/templates/guacUserMenu.html @@ -1,6 +1,13 @@