diff --git a/guacamole/src/main/webapp/app/navigation/services/userPageService.js b/guacamole/src/main/webapp/app/navigation/services/userPageService.js index 4d1e61246..27ae4d740 100644 --- a/guacamole/src/main/webapp/app/navigation/services/userPageService.js +++ b/guacamole/src/main/webapp/app/navigation/services/userPageService.js @@ -71,10 +71,10 @@ angular.module('navigation').factory('userPageService', ['$injector', var settingsPages = generateSettingsPages(permissions); // If user has access to settings pages, return home page and skip - // evaluation for automatic connections. The Preferences page is - // a Settings page and is always visible, so we look for more than - // one to indicate access to administrative pages. - if (settingsPages.length > 1) + // evaluation for automatic connections. The Preferences and Session + // Management pages are "Settings" pages and are always visible, so + // we look for more than two to indicate access to administrative pages. + if (settingsPages.length > 2) return SYSTEM_HOME_PAGE; // Determine whether a connection or balancing group should serve as @@ -257,25 +257,16 @@ angular.module('navigation').factory('userPageService', ['$injector', canManageConnections.push(dataSource); } - // Determine whether the current user needs access to the session management UI or view connection history + // Determine whether the current user needs access to view connection history if ( - // A user must be a system administrator to manage sessions + // A user must be a system administrator to view connection records PermissionSet.hasSystemPermission(permissions, PermissionSet.SystemPermissionType.ADMINISTER) ) { - canManageSessions.push(dataSource); canViewConnectionRecords.push(dataSource); } }); - // If user can manage sessions, add link to sessions management page - if (canManageSessions.length) { - pages.push(new PageDefinition({ - name : 'USER_MENU.ACTION_MANAGE_SESSIONS', - url : '/settings/sessions' - })); - } - // If user can manage connections, add links for connection management pages angular.forEach(canViewConnectionRecords, function addConnectionHistoryLink(dataSource) { pages.push(new PageDefinition({ @@ -306,6 +297,12 @@ angular.module('navigation').factory('userPageService', ['$injector', })); }); + // Add link to session management (always accessible) + pages.push(new PageDefinition({ + name : 'USER_MENU.ACTION_MANAGE_SESSIONS', + url : '/settings/sessions' + })); + // Add link to user preferences (always accessible) pages.push(new PageDefinition({ name : 'USER_MENU.ACTION_MANAGE_PREFERENCES',