mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUAC-586: Do not include tabs for accounts that do not exist and cannot be created. Style read-only accounts differently.
This commit is contained in:
@@ -393,13 +393,25 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto
|
||||
angular.forEach(dataSources, function addAccountPage(dataSource) {
|
||||
|
||||
// Determine whether data source contains this user
|
||||
var linked = $scope.userExists(dataSource);
|
||||
var linked = $scope.userExists(dataSource);
|
||||
var readOnly = $scope.isReadOnly(dataSource);
|
||||
|
||||
// Account is not relevant if it does not exist and cannot be
|
||||
// created
|
||||
if (!linked && readOnly)
|
||||
return;
|
||||
|
||||
// Determine class name based on read-only / linked status
|
||||
var className;
|
||||
if (readOnly) className = 'read-only';
|
||||
else if (linked) className = 'linked';
|
||||
else className = 'unlinked';
|
||||
|
||||
// Add page entry
|
||||
$scope.accountPages.push(new PageDefinition({
|
||||
name : translationStringService.canonicalize('DATA_SOURCE_' + dataSource) + '.NAME',
|
||||
url : '/manage/' + encodeURIComponent(dataSource) + '/users/' + encodeURIComponent(username),
|
||||
className : linked ? 'linked' : 'unlinked'
|
||||
className : className
|
||||
}));
|
||||
|
||||
});
|
||||
|
@@ -28,14 +28,16 @@
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.manage-user .page-tabs .page-list li.unlinked a[href],
|
||||
.manage-user .page-tabs .page-list li.linked a[href] {
|
||||
.manage-user .page-tabs .page-list li.read-only a[href],
|
||||
.manage-user .page-tabs .page-list li.unlinked a[href],
|
||||
.manage-user .page-tabs .page-list li.linked a[href] {
|
||||
padding-right: 2.5em;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.manage-user .page-tabs .page-list li.unlinked a[href]:before,
|
||||
.manage-user .page-tabs .page-list li.linked a[href]:before {
|
||||
.manage-user .page-tabs .page-list li.read-only a[href]:before,
|
||||
.manage-user .page-tabs .page-list li.unlinked a[href]:before,
|
||||
.manage-user .page-tabs .page-list li.linked a[href]:before {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
right: 0;
|
||||
@@ -47,6 +49,10 @@
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.manage-user .page-tabs .page-list li.read-only a[href]:before {
|
||||
background-image: url('images/lock.png');
|
||||
}
|
||||
|
||||
.manage-user .page-tabs .page-list li.unlinked a[href]:before {
|
||||
background-image: url('images/plus.png');
|
||||
}
|
||||
|
BIN
guacamole/src/main/webapp/images/lock.png
Normal file
BIN
guacamole/src/main/webapp/images/lock.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 511 B |
Reference in New Issue
Block a user