GUACAMOLE-78: Do not display user menu for anonymous users.

This commit is contained in:
Michael Jumper
2016-08-12 13:55:59 -07:00
parent df3f54a02d
commit c6323503d8
2 changed files with 13 additions and 2 deletions

View File

@@ -69,6 +69,17 @@ angular.module('navigation').directive('guacUserMenu', [function guacUserMenu()
$scope.pages = pages;
});
/**
* Returns whether the current user has authenticated anonymously.
*
* @returns {Boolean}
* true if the current user has authenticated anonymously, false
* otherwise.
*/
$scope.isAnonymous = function isAnonymous() {
return authenticationService.isAnonymous();
};
/**
* Logs out the current user, redirecting them to back to the root
* after logout completes.

View File

@@ -1,4 +1,4 @@
<div class="user-menu">
<div class="user-menu" ng-show="!isAnonymous()">
<guac-menu menu-title="username">
<!-- Local actions -->