diff --git a/guacamole/src/main/webapp/app/navigation/services/userPageService.js b/guacamole/src/main/webapp/app/navigation/services/userPageService.js index 9001aa1e0..933f89fb6 100644 --- a/guacamole/src/main/webapp/app/navigation/services/userPageService.js +++ b/guacamole/src/main/webapp/app/navigation/services/userPageService.js @@ -211,8 +211,9 @@ angular.module('navigation').factory('userPageService', ['$injector', // Permission to administer users || PermissionSet.hasUserPermission(permissions, PermissionSet.ObjectPermissionType.ADMINISTER) - ) + ) { canManageUsers.push(dataSource); + } // Determine whether the current user needs access to the connection management UI if ( @@ -232,16 +233,18 @@ angular.module('navigation').factory('userPageService', ['$injector', // Permission to administer connections or connection groups || PermissionSet.hasConnectionPermission(permissions, PermissionSet.ObjectPermissionType.ADMINISTER) || PermissionSet.hasConnectionGroupPermission(permissions, PermissionSet.ObjectPermissionType.ADMINISTER) - ) + ) { canManageConnections.push(dataSource); + } // Determine whether the current user needs access to the session management UI or view connection history if ( // A user must be a system administrator to manage sessions PermissionSet.hasSystemPermission(permissions, PermissionSet.SystemPermissionType.ADMINISTER) - ) + ) { canManageSessions.push(dataSource); canViewConnectionRecords.push(dataSource); + } }); diff --git a/guacamole/src/main/webapp/app/settings/directives/guacSettingsConnectionHistory.js b/guacamole/src/main/webapp/app/settings/directives/guacSettingsConnectionHistory.js index 0290d6046..3e6dbd298 100644 --- a/guacamole/src/main/webapp/app/settings/directives/guacSettingsConnectionHistory.js +++ b/guacamole/src/main/webapp/app/settings/directives/guacSettingsConnectionHistory.js @@ -110,7 +110,20 @@ angular.module('settings').directive('guacSettingsConnectionHistory', [function return $scope.historyRecords !== null && $scope.dateFormat !== null; }; - + + /** + * Returns whether the search has completed but contains no history + * records. This function will return false if there are history + * records in the results OR if the search has not yet completed. + * + * @returns {Boolean} + * true if the search results have been loaded but no history + * records are present, false otherwise. + */ + $scope.isHistoryEmpty = function isHistoryEmpty() { + return $scope.isLoaded() && $scope.historyRecords.length === 0; + }; + /** * Query the API for the connection record history, filtered by * searchString, and ordered by order. diff --git a/guacamole/src/main/webapp/app/settings/templates/settingsConnectionHistory.html b/guacamole/src/main/webapp/app/settings/templates/settingsConnectionHistory.html index 9a54d6883..718bb004b 100644 --- a/guacamole/src/main/webapp/app/settings/templates/settingsConnectionHistory.html +++ b/guacamole/src/main/webapp/app/settings/templates/settingsConnectionHistory.html @@ -31,7 +31,7 @@ -
{{historyRecord.username}} | {{historyRecord.startDate | date : dateFormat}} | @@ -62,7 +62,7 @@
+
{{'SETTINGS_CONNECTION_HISTORY.INFO_NO_HISTORY' | translate}}