GUACAMOLE-598: Ignore if current user has no associated data. Authentication providers are not required to provide data for the users they authenticate.

This commit is contained in:
Michael Jumper
2018-12-04 13:22:13 -08:00
parent fc457c080d
commit ef0cb1ee7a

View File

@@ -95,13 +95,10 @@ angular.module('navigation').directive('guacUserMenu', [function guacUserMenu()
*/ */
$scope.role = null; $scope.role = null;
// Pull user data // Display user profile attributes if available
userService.getUser(authenticationService.getDataSource(), $scope.username) userService.getUser(authenticationService.getDataSource(), $scope.username)
.then(function userRetrieved(user) { .then(function userRetrieved(user) {
// Store retrieved user object
$scope.user = user;
// Pull basic profile information // Pull basic profile information
$scope.fullName = user.attributes[User.Attributes.FULL_NAME]; $scope.fullName = user.attributes[User.Attributes.FULL_NAME];
$scope.organization = user.attributes[User.Attributes.ORGANIZATION]; $scope.organization = user.attributes[User.Attributes.ORGANIZATION];
@@ -111,7 +108,7 @@ angular.module('navigation').directive('guacUserMenu', [function guacUserMenu()
var email = user.attributes[User.Attributes.EMAIL_ADDRESS]; var email = user.attributes[User.Attributes.EMAIL_ADDRESS];
$scope.userURL = email ? 'mailto:' + email : null; $scope.userURL = email ? 'mailto:' + email : null;
}, requestService.DIE); }, requestService.IGNORE);
/** /**
* The available main pages for the current user. * The available main pages for the current user.