mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-1479: Merge change to styling of disabled users/groups.
This commit is contained in:
@@ -29,7 +29,7 @@ import org.apache.guacamole.net.auth.permission.SystemPermissionSet;
|
||||
* Base implementation of UserGroup which provides default implementations of
|
||||
* most functions.
|
||||
*/
|
||||
public class AbstractUserGroup extends AbstractIdentifiable implements UserGroup {
|
||||
public abstract class AbstractUserGroup extends AbstractIdentifiable implements UserGroup {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
|
@@ -77,6 +77,16 @@ public class DelegatingUser implements User {
|
||||
public void setPassword(String password) {
|
||||
user.setPassword(password);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDisabled() {
|
||||
return user.isDisabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDisabled(boolean disabled) {
|
||||
user.setDisabled(disabled);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getAttributes() {
|
||||
|
@@ -65,6 +65,16 @@ public class DelegatingUserGroup implements UserGroup {
|
||||
public void setIdentifier(String identifier) {
|
||||
userGroup.setIdentifier(identifier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDisabled() {
|
||||
return userGroup.isDisabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDisabled(boolean disabled) {
|
||||
userGroup.setDisabled(disabled);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getAttributes() {
|
||||
|
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.apache.guacamole.net.auth;
|
||||
|
||||
/**
|
||||
* An interface that defines items that can be enabled or disabled.
|
||||
*/
|
||||
public interface Disableable {
|
||||
|
||||
/**
|
||||
* Returns true if this object is disabled, otherwise false.
|
||||
*
|
||||
* @return
|
||||
* True if this object is disabled, otherwise false.
|
||||
*/
|
||||
default public boolean isDisabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the disabled status of this object to the boolean value provided,
|
||||
* true if the object should be disabled, otherwise false.
|
||||
*
|
||||
* @param disabled
|
||||
* True if the object should be disabled, otherwise false.
|
||||
*/
|
||||
default public void setDisabled(boolean disabled) {
|
||||
// Default implementation takes no action.
|
||||
}
|
||||
|
||||
}
|
@@ -29,7 +29,7 @@ import org.apache.guacamole.GuacamoleUnsupportedException;
|
||||
/**
|
||||
* A user of the Guacamole web application.
|
||||
*/
|
||||
public interface User extends Identifiable, Attributes, Permissions {
|
||||
public interface User extends Disableable, Identifiable, Attributes, Permissions {
|
||||
|
||||
/**
|
||||
* All standard attribute names with semantics defined by the Guacamole web
|
||||
|
@@ -26,7 +26,7 @@ import org.apache.guacamole.GuacamoleException;
|
||||
* any number of Guacamole users and other user groups, and defines the
|
||||
* permissions implicitly granted to its members.
|
||||
*/
|
||||
public interface UserGroup extends Identifiable, Attributes, Permissions {
|
||||
public interface UserGroup extends Disableable, Identifiable, Attributes, Permissions {
|
||||
|
||||
/**
|
||||
* Returns a set of all readable user groups of which this user group is a
|
||||
|
Reference in New Issue
Block a user