From 17f16428f899b718184cd3759c23f1ecdca496e8 Mon Sep 17 00:00:00 2001 From: Virtually Nick Date: Sun, 12 Mar 2023 20:18:15 -0400 Subject: [PATCH 1/6] GUACAMOLE-1479: Correct AbstractUserGroup to actually be an abstract class. --- .../java/org/apache/guacamole/net/auth/AbstractUserGroup.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/AbstractUserGroup.java b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/AbstractUserGroup.java index f63bfae7f0..2c89cb0506 100644 --- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/AbstractUserGroup.java +++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/AbstractUserGroup.java @@ -29,7 +29,7 @@ * 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} From beacffbfc78b0940ce8ac4b98ad97ba0e54ae510 Mon Sep 17 00:00:00 2001 From: Virtually Nick Date: Sun, 12 Mar 2023 20:49:22 -0400 Subject: [PATCH 2/6] GUACAMOLE-1479: Implement the disabled methods in guacamole-ext User and UserGroup classes. --- .../guacamole/net/auth/DelegatingUser.java | 10 +++++++++ .../net/auth/DelegatingUserGroup.java | 10 +++++++++ .../org/apache/guacamole/net/auth/User.java | 17 ++++++++++++++ .../apache/guacamole/net/auth/UserGroup.java | 19 ++++++++++++++++ .../guacamole/net/auth/simple/SimpleUser.java | 22 +++++++++++++++++++ .../net/auth/simple/SimpleUserGroup.java | 22 +++++++++++++++++++ 6 files changed, 100 insertions(+) diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/DelegatingUser.java b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/DelegatingUser.java index 9da0fb561a..9f2d93b23d 100644 --- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/DelegatingUser.java +++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/DelegatingUser.java @@ -77,6 +77,16 @@ public String getPassword() { 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 getAttributes() { diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/DelegatingUserGroup.java b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/DelegatingUserGroup.java index 22aa39a764..d52530748f 100644 --- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/DelegatingUserGroup.java +++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/DelegatingUserGroup.java @@ -65,6 +65,16 @@ public String getIdentifier() { 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 getAttributes() { diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java index 788e8d6746..9cdec2a073 100644 --- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java +++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java @@ -79,6 +79,23 @@ public static class Attribute { * @param password The password to set. */ public void setPassword(String password); + + /** + * Returns true if this user account is disabled, otherwise false. + * + * @return + * True if this user account is disabled, otherwise false. + */ + public boolean isDisabled(); + + /** + * Set the disabled status of this account to the boolean parameter as + * provided, true if the account should be disabled, otherwise false. + * + * @param disabled + * True if the account should be disabled, otherwise false. + */ + public void setDisabled(boolean disabled); /** * Returns the date and time that this user was last active. If the user diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/UserGroup.java b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/UserGroup.java index 4dd167d13e..cbb26a9e89 100644 --- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/UserGroup.java +++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/UserGroup.java @@ -28,6 +28,25 @@ */ public interface UserGroup extends Identifiable, Attributes, Permissions { + /** + * Returns true if the user group is disabled, making membership in the group + * ineffective, meaning that any permissions or other group membership + * assigned to this group will not apply to member groups and users. + * + * @return + * True if the group is disabled, otherwise false. + */ + public boolean isDisabled(); + + /** + * Set the disabled status of the user group, passing a boolean true value + * if the user group should be disabled, otherwise false. + * + * @param disabled + * True if the user group should be disabled, otherwise false. + */ + public void setDisabled(boolean disabled); + /** * Returns a set of all readable user groups of which this user group is a * member. If permission is granted for the current user to modify the diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleUser.java b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleUser.java index 8e349e27cb..9274ea23f5 100644 --- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleUser.java +++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleUser.java @@ -64,6 +64,28 @@ public SimpleUser() { public SimpleUser(String username) { super.setIdentifier(username); } + + /** + * {@inheritDoc} + * + *

This User implementation is always enabled, so this method will + * always return false. + */ + @Override + public boolean isDisabled() { + return false; + } + + /** + * {@inheritDoc} + * + *

This User implementation is always enabled, so this method will + * silently ignore the value passed in under the disabled parameter. + */ + @Override + public void setDisabled(boolean disabled) { + // Silently ignore disabled value + } /** * Adds a new READ permission to the given set of permissions for each of diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleUserGroup.java b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleUserGroup.java index be52d16420..f06eabfe11 100644 --- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleUserGroup.java +++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleUserGroup.java @@ -43,5 +43,27 @@ public SimpleUserGroup() { public SimpleUserGroup(String identifier) { super.setIdentifier(identifier); } + + /** + * {@inheritDoc} + * + *

This implementation of UserGroup is always enabled, so this will + * always return false. + */ + @Override + public boolean isDisabled() { + return false; + } + + /** + * {@inheritDoc} + * + *

This implementation of UserGroup is always enabled, so this method + * will silently ignore the value passed in the disabled parameter. + */ + @Override + public void setDisabled(boolean disabled) { + // Silently ignore as the UserGroup implementation is always enabled. + } } From 75250148b0170f71bcd4090a3dd388d13d1845db Mon Sep 17 00:00:00 2001 From: Virtually Nick Date: Sun, 12 Mar 2023 20:49:50 -0400 Subject: [PATCH 3/6] GUACAMOLE-1479: Implement the disabled methods for User and UserGroup in REST API. --- .../apache/guacamole/rest/user/APIUser.java | 47 +++++++++++++++++-- .../guacamole/rest/user/APIUserWrapper.java | 10 ++++ .../rest/user/UserObjectTranslator.java | 3 ++ .../rest/usergroup/APIUserGroup.java | 27 +++++++++++ .../rest/usergroup/APIUserGroupWrapper.java | 10 ++++ .../usergroup/UserGroupObjectTranslator.java | 3 ++ 6 files changed, 95 insertions(+), 5 deletions(-) diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/user/APIUser.java b/guacamole/src/main/java/org/apache/guacamole/rest/user/APIUser.java index f018074b63..06f1de1593 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/user/APIUser.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/user/APIUser.java @@ -43,6 +43,11 @@ public class APIUser { */ private String password; + /** + * Boolean value indicating whether or not this user account is disabled. + */ + private boolean disabled; + /** * Map of all associated attributes by attribute identifier. */ @@ -61,7 +66,9 @@ public APIUser() {} /** * Construct a new APIUser from the provided User. - * @param user The User to construct the APIUser from. + * + * @param user + * The User to construct the APIUser from. */ public APIUser(User user) { @@ -69,6 +76,7 @@ public APIUser(User user) { this.username = user.getIdentifier(); this.password = user.getPassword(); this.lastActive = user.getLastActive(); + this.disabled = user.isDisabled(); // Associate any attributes this.attributes = user.getAttributes(); @@ -77,7 +85,9 @@ public APIUser(User user) { /** * Returns the username for this user. - * @return The username for this user. + * + * @return + * The username for this user. */ public String getUsername() { return username; @@ -85,7 +95,9 @@ public String getUsername() { /** * Set the username for this user. - * @param username The username for this user. + * + * @param username + * The username for this user. */ public void setUsername(String username) { this.username = username; @@ -93,7 +105,9 @@ public void setUsername(String username) { /** * Returns the password for this user. - * @return The password for this user. + * + * @return + * The password for this user. */ public String getPassword() { return password; @@ -101,11 +115,34 @@ public String getPassword() { /** * Set the password for this user. - * @param password The password for this user. + * + * @param password + * The password for this user. */ public void setPassword(String password) { this.password = password; } + + /** + * Returns true if this user account is disabled, otherwise false. + * + * @return + * True if this user account is disabled, otherwise false. + */ + public boolean isDisabled() { + return disabled; + } + + /** + * Sets the disabled status of this user account, disabling the account + * if set to true. + * + * @param disabled + * True if this user account should be disabled. + */ + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } /** * Returns a map of all attributes associated with this user. Each entry diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/user/APIUserWrapper.java b/guacamole/src/main/java/org/apache/guacamole/rest/user/APIUserWrapper.java index b086314f63..f48a9cf461 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/user/APIUserWrapper.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/user/APIUserWrapper.java @@ -69,6 +69,16 @@ public String getPassword() { public void setPassword(String password) { apiUser.setPassword(password); } + + @Override + public boolean isDisabled() { + return apiUser.isDisabled(); + } + + @Override + public void setDisabled(boolean disabled) { + apiUser.setDisabled(disabled); + } @Override public Map getAttributes() { diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/user/UserObjectTranslator.java b/guacamole/src/main/java/org/apache/guacamole/rest/user/UserObjectTranslator.java index 8c63d72180..f1a595bf72 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/user/UserObjectTranslator.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/user/UserObjectTranslator.java @@ -49,6 +49,9 @@ public void applyExternalChanges(User existingObject, // Do not update the user password if no password was provided if (object.getPassword() != null) existingObject.setPassword(object.getPassword()); + + // Update disabled status + existingObject.setDisabled(object.isDisabled()); // Update user attributes existingObject.setAttributes(object.getAttributes()); diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/usergroup/APIUserGroup.java b/guacamole/src/main/java/org/apache/guacamole/rest/usergroup/APIUserGroup.java index df4847bc99..547fb1fca4 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/usergroup/APIUserGroup.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/usergroup/APIUserGroup.java @@ -36,6 +36,11 @@ public class APIUserGroup { * The identifier of this user group. */ private String identifier; + + /** + * Boolean value indicating if this UserGroup is disabled. + */ + private boolean disabled; /** * Map of all associated attributes by attribute identifier. @@ -55,6 +60,7 @@ public APIUserGroup() {} */ public APIUserGroup(UserGroup group) { this.identifier = group.getIdentifier(); + this.disabled = group.isDisabled(); this.attributes = group.getAttributes(); } @@ -79,6 +85,27 @@ public String getIdentifier() { public void setIdentifier(String identifier) { this.identifier = identifier; } + + /** + * Return true if this user group is disabled, otherwise false. + * + * @return + * True if this user group is disabled, otherwise false. + */ + public boolean isDisabled() { + return disabled; + } + + /** + * Sets whether or not this user group is disabled to the parameter + * provided. + * + * @param disabled + * True if the user group should be disabled, otherwise false. + */ + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } /** * Returns a map of all attributes associated with this user group. Each diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/usergroup/APIUserGroupWrapper.java b/guacamole/src/main/java/org/apache/guacamole/rest/usergroup/APIUserGroupWrapper.java index 5dc6d7b0a9..c195e87d08 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/usergroup/APIUserGroupWrapper.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/usergroup/APIUserGroupWrapper.java @@ -61,6 +61,16 @@ public String getIdentifier() { public void setIdentifier(String identifier) { apiUserGroup.setIdentifier(identifier); } + + @Override + public boolean isDisabled() { + return apiUserGroup.isDisabled(); + } + + @Override + public void setDisabled(boolean disabled) { + apiUserGroup.setDisabled(disabled); + } @Override public Map getAttributes() { diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/usergroup/UserGroupObjectTranslator.java b/guacamole/src/main/java/org/apache/guacamole/rest/usergroup/UserGroupObjectTranslator.java index 88000b0104..a947b8fd4e 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/usergroup/UserGroupObjectTranslator.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/usergroup/UserGroupObjectTranslator.java @@ -47,6 +47,9 @@ public UserGroup toInternalObject(APIUserGroup object) public void applyExternalChanges(UserGroup existingObject, APIUserGroup object) throws GuacamoleException { + // Update disabled status + existingObject.setDisabled(object.isDisabled()); + // Update user attributes existingObject.setAttributes(object.getAttributes()); From 015117f079e0c27306db47e3b6eda808e0393188 Mon Sep 17 00:00:00 2001 From: Virtually Nick Date: Sun, 12 Mar 2023 21:14:47 -0400 Subject: [PATCH 4/6] GUACAMOLE-1479: Switch JDBC module to use disabled methods instead of attributes. --- .../auth/jdbc/sharing/user/SharedUser.java | 22 ++++++++++ .../guacamole/auth/jdbc/user/ModeledUser.java | 38 +++++------------ .../auth/jdbc/usergroup/ModeledUserGroup.java | 41 ++++++------------- 3 files changed, 45 insertions(+), 56 deletions(-) diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/sharing/user/SharedUser.java b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/sharing/user/SharedUser.java index 80d22198cc..5dcd8740d5 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/sharing/user/SharedUser.java +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/sharing/user/SharedUser.java @@ -78,6 +78,28 @@ public String getIdentifier() { public void setIdentifier(String identifier) { throw new UnsupportedOperationException("Users authenticated via share keys are immutable."); } + + /** + * {@inheritDoc} + * + *

SharedUser accounts are always enabled, as access is controlled via + * the shared token. + */ + @Override + public boolean isDisabled() { + return false; + } + + /** + * {@inheritDoc} + * + *

This method silently ignores the value passed in the disabled parameter, + * as disabling the account is done by invalidating the sharing token. + */ + @Override + public void setDisabled(boolean disabled) { + // Silently ignore the parameter + } @Override public Map getAttributes() { diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java index c10bd435ce..811ccaa311 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java @@ -63,12 +63,6 @@ public class ModeledUser extends ModeledPermissions implements User { */ private static final Logger logger = LoggerFactory.getLogger(ModeledUser.class); - /** - * The name of the attribute which controls whether a user account is - * disabled. - */ - public static final String DISABLED_ATTRIBUTE_NAME = "disabled"; - /** * The name of the attribute which controls whether a user's password is * expired and must be reset upon login. @@ -121,7 +115,6 @@ public class ModeledUser extends ModeledPermissions implements User { * form. */ public static final Form ACCOUNT_RESTRICTIONS = new Form("restrictions", Arrays.asList( - new BooleanField(DISABLED_ATTRIBUTE_NAME, "true"), new BooleanField(EXPIRED_ATTRIBUTE_NAME, "true"), new TimeField(ACCESS_WINDOW_START_ATTRIBUTE_NAME), new TimeField(ACCESS_WINDOW_END_ATTRIBUTE_NAME), @@ -149,7 +142,6 @@ public class ModeledUser extends ModeledPermissions implements User { User.Attribute.EMAIL_ADDRESS, User.Attribute.ORGANIZATION, User.Attribute.ORGANIZATIONAL_ROLE, - DISABLED_ATTRIBUTE_NAME, EXPIRED_ATTRIBUTE_NAME, ACCESS_WINDOW_START_ATTRIBUTE_NAME, ACCESS_WINDOW_END_ATTRIBUTE_NAME, @@ -281,6 +273,16 @@ public void setPassword(String password) { userModel.setPasswordDate(new Timestamp(System.currentTimeMillis())); } + + @Override + public boolean isDisabled() { + return getModel().isDisabled(); + } + + @Override + public void setDisabled(boolean disabled) { + getModel().setDisabled(disabled); + } /** * Returns the this user's current password record. If the user is new, this @@ -309,9 +311,6 @@ public PasswordRecordModel getPasswordRecord() { */ private void putRestrictedAttributes(Map attributes) { - // Set disabled attribute - attributes.put(DISABLED_ATTRIBUTE_NAME, getModel().isDisabled() ? "true" : null); - // Set password expired attribute attributes.put(EXPIRED_ATTRIBUTE_NAME, getModel().isExpired() ? "true" : null); @@ -424,10 +423,6 @@ private Time parseTime(String timeString) */ private void setRestrictedAttributes(Map attributes) { - // Translate disabled attribute - if (attributes.containsKey(DISABLED_ATTRIBUTE_NAME)) - getModel().setDisabled("true".equals(attributes.get(DISABLED_ATTRIBUTE_NAME))); - // Translate password expired attribute if (attributes.containsKey(EXPIRED_ATTRIBUTE_NAME)) getModel().setExpired("true".equals(attributes.get(EXPIRED_ATTRIBUTE_NAME))); @@ -737,19 +732,6 @@ public boolean isAccountAccessible() { return isActive(getAccessWindowStart(), getAccessWindowEnd()); } - /** - * Returns whether this user account has been disabled. The credentials of - * disabled user accounts are treated as invalid, effectively disabling - * that user's access to data for which they would otherwise have - * permission. - * - * @return - * true if this user account has been disabled, false otherwise. - */ - public boolean isDisabled() { - return getModel().isDisabled(); - } - /** * Returns whether this user's password has expired. If a user's password * is expired, it must be immediately changed upon login. A user account diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/usergroup/ModeledUserGroup.java b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/usergroup/ModeledUserGroup.java index b31b61e1ee..8b30db4b31 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/usergroup/ModeledUserGroup.java +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/usergroup/ModeledUserGroup.java @@ -42,36 +42,17 @@ public class ModeledUserGroup extends ModeledPermissions implements UserGroup { - /** - * The name of the attribute which controls whether a user group is - * disabled. - */ - public static final String DISABLED_ATTRIBUTE_NAME = "disabled"; - - /** - * All attributes related to restricting user groups, within a logical - * form. - */ - public static final Form ACCOUNT_RESTRICTIONS = new Form("restrictions", Arrays.asList( - new BooleanField(DISABLED_ATTRIBUTE_NAME, "true") - )); - /** * All possible attributes of user groups organized as individual, * logical forms. */ - public static final Collection

ATTRIBUTES = Collections.unmodifiableCollection(Arrays.asList( - ACCOUNT_RESTRICTIONS - )); - + public static final Collection ATTRIBUTES = Collections.emptyList(); + /** * The names of all attributes which are explicitly supported by this * extension's UserGroup objects. */ - public static final Set ATTRIBUTE_NAMES = - Collections.unmodifiableSet(new HashSet(Arrays.asList( - DISABLED_ATTRIBUTE_NAME - ))); + public static final Set ATTRIBUTE_NAMES = Collections.emptySet(); /** * Provider for RelatedObjectSets containing the user groups of which this @@ -121,6 +102,16 @@ public void init(ModeledAuthenticatedUser currentUser, UserGroupModel model, super.init(currentUser, model); this.exposeRestrictedAttributes = exposeRestrictedAttributes; } + + @Override + public boolean isDisabled() { + return getModel().isDisabled(); + } + + @Override + public void setDisabled(boolean disabled) { + getModel().setDisabled(disabled); + } /** * Stores all restricted (privileged) attributes within the given Map, @@ -133,9 +124,6 @@ public void init(ModeledAuthenticatedUser currentUser, UserGroupModel model, */ private void putRestrictedAttributes(Map attributes) { - // Set disabled attribute - attributes.put(DISABLED_ATTRIBUTE_NAME, getModel().isDisabled() ? "true" : null); - } /** @@ -147,9 +135,6 @@ private void putRestrictedAttributes(Map attributes) { */ private void setRestrictedAttributes(Map attributes) { - // Translate disabled attribute - getModel().setDisabled("true".equals(attributes.get(DISABLED_ATTRIBUTE_NAME))); - } @Override From 61457686e32cd09376d0de694cbfacbce564a800 Mon Sep 17 00:00:00 2001 From: Virtually Nick Date: Sat, 25 Dec 2021 22:43:09 -0500 Subject: [PATCH 5/6] GUACAMOLE-1479: Update front-end styles and translations for disabled users and user groups. --- .../src/main/resources/translations/ca.json | 3 --- .../src/main/resources/translations/de.json | 5 +---- .../src/main/resources/translations/en.json | 3 --- .../src/main/resources/translations/es.json | 3 --- .../src/main/resources/translations/fr.json | 3 --- .../src/main/resources/translations/ja.json | 4 +--- .../src/main/resources/translations/ko.json | 3 --- .../src/main/resources/translations/pl.json | 3 --- .../src/main/resources/translations/pt.json | 3 --- .../src/main/resources/translations/ru.json | 3 --- .../src/main/resources/translations/zh.json | 3 --- .../src/app/manage/templates/manageUser.html | 4 ++++ .../src/app/manage/templates/manageUserGroup.html | 4 ++++ .../frontend/src/app/manage/types/ManageableUser.js | 11 +++++++++++ .../src/main/frontend/src/app/rest/types/User.js | 7 +++++++ .../main/frontend/src/app/rest/types/UserGroup.js | 7 +++++++ .../src/app/settings/styles/user-group-list.css | 12 +++++++++--- .../frontend/src/app/settings/styles/user-list.css | 8 +++++++- .../app/settings/templates/settingsUserGroups.html | 2 +- .../src/app/settings/templates/settingsUsers.html | 2 +- guacamole/src/main/frontend/src/translations/ca.json | 2 ++ guacamole/src/main/frontend/src/translations/de.json | 2 ++ guacamole/src/main/frontend/src/translations/en.json | 2 ++ guacamole/src/main/frontend/src/translations/es.json | 2 ++ guacamole/src/main/frontend/src/translations/fr.json | 2 ++ guacamole/src/main/frontend/src/translations/ja.json | 2 ++ guacamole/src/main/frontend/src/translations/ko.json | 2 ++ guacamole/src/main/frontend/src/translations/pl.json | 2 ++ guacamole/src/main/frontend/src/translations/pt.json | 2 ++ guacamole/src/main/frontend/src/translations/ru.json | 2 ++ guacamole/src/main/frontend/src/translations/zh.json | 6 ++++-- 31 files changed, 77 insertions(+), 42 deletions(-) diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/ca.json b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/ca.json index 64b27238a2..c908548f1a 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/ca.json +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/ca.json @@ -89,7 +89,6 @@ "USER_ATTRIBUTES" : { - "FIELD_HEADER_DISABLED" : "Inici de sessió desactivat:", "FIELD_HEADER_EXPIRED" : "Contrasenya caducada:", "FIELD_HEADER_ACCESS_WINDOW_END" : "No permetre l'accés després:", "FIELD_HEADER_ACCESS_WINDOW_START" : "Permet l'accés després:", @@ -104,8 +103,6 @@ "USER_GROUP_ATTRIBUTES" : { - "FIELD_HEADER_DISABLED" : "Desactivat:", - "SECTION_HEADER_RESTRICTIONS" : "Restriccions de grup" } diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/de.json b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/de.json index 452d9ac041..20ffe0988e 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/de.json +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/de.json @@ -88,7 +88,6 @@ "USER_ATTRIBUTES" : { - "FIELD_HEADER_DISABLED" : "Login deaktiviert:", "FIELD_HEADER_EXPIRED" : "Passwort abgelaufen:", "FIELD_HEADER_ACCESS_WINDOW_END" : "Zugriff nach dieser Uhrzeit nicht mehr erlauben:", "FIELD_HEADER_ACCESS_WINDOW_START" : "Zugriff erst nach dieser Uhrzeit erlauben:", @@ -102,9 +101,7 @@ }, "USER_GROUP_ATTRIBUTES" : { - - "FIELD_HEADER_DISABLED" : "Deaktiviert:", - + "SECTION_HEADER_RESTRICTIONS" : "Gruppeneinschränkung" } diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/en.json b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/en.json index b286f0c491..a16880ba73 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/en.json +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/en.json @@ -89,7 +89,6 @@ "USER_ATTRIBUTES" : { - "FIELD_HEADER_DISABLED" : "Login disabled:", "FIELD_HEADER_EXPIRED" : "Password expired:", "FIELD_HEADER_ACCESS_WINDOW_END" : "Do not allow access after:", "FIELD_HEADER_ACCESS_WINDOW_START" : "Allow access after:", @@ -104,8 +103,6 @@ "USER_GROUP_ATTRIBUTES" : { - "FIELD_HEADER_DISABLED" : "Disabled:", - "SECTION_HEADER_RESTRICTIONS" : "Group Restrictions" } diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/es.json b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/es.json index e6c06a8179..e3b1ef906c 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/es.json +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/es.json @@ -89,7 +89,6 @@ "USER_ATTRIBUTES" : { - "FIELD_HEADER_DISABLED" : "Inicio de sesión deshabilitado:", "FIELD_HEADER_EXPIRED" : "Contraseña expirada:", "FIELD_HEADER_ACCESS_WINDOW_END" : "No permitir acceso despues de:", "FIELD_HEADER_ACCESS_WINDOW_START" : "Permitir acceso despues de:", @@ -104,8 +103,6 @@ "USER_GROUP_ATTRIBUTES" : { - "FIELD_HEADER_DISABLED" : "Deshabilitado:", - "SECTION_HEADER_RESTRICTIONS" : "Restricciones de grupo" } diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/fr.json b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/fr.json index a85fad4410..63b27cdb97 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/fr.json +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/fr.json @@ -89,7 +89,6 @@ "USER_ATTRIBUTES" : { - "FIELD_HEADER_DISABLED" : "Connexion désactivée:", "FIELD_HEADER_EXPIRED" : "Mot de passe expiré:", "FIELD_HEADER_ACCESS_WINDOW_END" : "Ne pas autoriser l'accès après:", "FIELD_HEADER_ACCESS_WINDOW_START" : "Autoriser l'accès après:", @@ -104,8 +103,6 @@ "USER_GROUP_ATTRIBUTES" : { - "FIELD_HEADER_DISABLED" : "Désactivé:", - "SECTION_HEADER_RESTRICTIONS" : "Restrictions de groupe" } diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/ja.json b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/ja.json index 2c94c4397e..18aaf59717 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/ja.json +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/ja.json @@ -75,7 +75,7 @@ "USER_ATTRIBUTES" : { - "FIELD_HEADER_DISABLED" : "ログインの無効化:", + "FIELD_HEADER_EXPIRED" : "パスワード変更の強制:", "FIELD_HEADER_ACCESS_WINDOW_END" : "指定した時刻からアクセスを禁止する:", "FIELD_HEADER_ACCESS_WINDOW_START" : "指定した時刻からアクセスを許可する:", @@ -90,8 +90,6 @@ "USER_GROUP_ATTRIBUTES" : { - "FIELD_HEADER_DISABLED" : "グループの無効化:", - "SECTION_HEADER_RESTRICTIONS" : "グループ制限" } diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/ko.json b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/ko.json index 6c1a24da50..bfc124ab92 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/ko.json +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/ko.json @@ -88,7 +88,6 @@ "USER_ATTRIBUTES" : { - "FIELD_HEADER_DISABLED" : "로그인 비활성화:", "FIELD_HEADER_EXPIRED" : "비밀번호 만료됨:", "FIELD_HEADER_ACCESS_WINDOW_END" : "다음 이후에 액세스 허용 안함 :", "FIELD_HEADER_ACCESS_WINDOW_START" : "다음 이후에 엑세스 허용:", @@ -103,8 +102,6 @@ "USER_GROUP_ATTRIBUTES" : { - "FIELD_HEADER_DISABLED" : "비활성화:", - "SECTION_HEADER_RESTRICTIONS" : "그룹 제한" } diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/pl.json b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/pl.json index 8c31932aa9..a5b5fc11f1 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/pl.json +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/pl.json @@ -89,7 +89,6 @@ "USER_ATTRIBUTES" : { - "FIELD_HEADER_DISABLED" : "Logowanie zablokowane:", "FIELD_HEADER_EXPIRED" : "Hasło wygasło:", "FIELD_HEADER_ACCESS_WINDOW_END" : "Nie zezwalaj na dostęp po:", "FIELD_HEADER_ACCESS_WINDOW_START" : "Zezwalaj na dostęp od:", @@ -104,8 +103,6 @@ "USER_GROUP_ATTRIBUTES" : { - "FIELD_HEADER_DISABLED" : "Wyłączona:", - "SECTION_HEADER_RESTRICTIONS" : "Ograniczenia Grupy" } diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/pt.json b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/pt.json index 928077038d..aafd4675c3 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/pt.json +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/pt.json @@ -90,7 +90,6 @@ "USER_ATTRIBUTES" : { - "FIELD_HEADER_DISABLED" : "Login desativado:", "FIELD_HEADER_EXPIRED" : "Senha expirada:", "FIELD_HEADER_ACCESS_WINDOW_END" : "Não permitir acesso após:", "FIELD_HEADER_ACCESS_WINDOW_START" : "Permitir acesso após:", @@ -105,8 +104,6 @@ "USER_GROUP_ATTRIBUTES" : { - "FIELD_HEADER_DISABLED" : "Desativado:", - "SECTION_HEADER_RESTRICTIONS" : "Restrições de Grupo" } diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/ru.json b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/ru.json index 12e9c6f935..110a4bc5c1 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/ru.json +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/ru.json @@ -88,7 +88,6 @@ "USER_ATTRIBUTES" : { - "FIELD_HEADER_DISABLED" : "Аккаунт отключен:", "FIELD_HEADER_EXPIRED" : "Пароль просрочен:", "FIELD_HEADER_ACCESS_WINDOW_END" : "Запретить доступ после:", "FIELD_HEADER_ACCESS_WINDOW_START" : "Разрешить доступ после:", @@ -103,8 +102,6 @@ "USER_GROUP_ATTRIBUTES" : { - "FIELD_HEADER_DISABLED" : "Группа отключена:", - "SECTION_HEADER_RESTRICTIONS" : "Ограничения" } diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/zh.json b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/zh.json index 44b6bf2334..ff91c7e81c 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/zh.json +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/zh.json @@ -89,7 +89,6 @@ "USER_ATTRIBUTES" : { - "FIELD_HEADER_DISABLED" : "已禁用登录:", "FIELD_HEADER_EXPIRED" : "密码已过期:", "FIELD_HEADER_ACCESS_WINDOW_END" : "之后不允许访问:", "FIELD_HEADER_ACCESS_WINDOW_START" : "之后允许访问:", @@ -104,8 +103,6 @@ "USER_GROUP_ATTRIBUTES" : { - "FIELD_HEADER_DISABLED" : "禁用:", - "SECTION_HEADER_RESTRICTIONS" : "组限制" } diff --git a/guacamole/src/main/frontend/src/app/manage/templates/manageUser.html b/guacamole/src/main/frontend/src/app/manage/templates/manageUser.html index 014c7659c1..d5896ecdd5 100644 --- a/guacamole/src/main/frontend/src/app/manage/templates/manageUser.html +++ b/guacamole/src/main/frontend/src/app/manage/templates/manageUser.html @@ -37,6 +37,10 @@

{{'MANAGE_USER.SECTION_HEADER_EDIT_USER' | translate}}

{{'MANAGE_USER.FIELD_HEADER_PASSWORD_AGAIN' | translate}} + + {{'MANAGE_USER.FIELD_HEADER_USER_DISABLED' | translate}} + + diff --git a/guacamole/src/main/frontend/src/app/manage/templates/manageUserGroup.html b/guacamole/src/main/frontend/src/app/manage/templates/manageUserGroup.html index 09fd3e68b1..c450baab98 100644 --- a/guacamole/src/main/frontend/src/app/manage/templates/manageUserGroup.html +++ b/guacamole/src/main/frontend/src/app/manage/templates/manageUserGroup.html @@ -28,6 +28,10 @@

{{'MANAGE_USER_GROUP.SECTION_HEADER_EDIT_USER_GROUP' | translate}}

{{userGroup.identifier}} + + {{'MANAGE_USER_GROUP.FIELD_HEADER_USER_GROUP_DISABLED' | translate}} + + diff --git a/guacamole/src/main/frontend/src/app/manage/types/ManageableUser.js b/guacamole/src/main/frontend/src/app/manage/types/ManageableUser.js index b67ddbdb7d..d6c987472d 100644 --- a/guacamole/src/main/frontend/src/app/manage/types/ManageableUser.js +++ b/guacamole/src/main/frontend/src/app/manage/types/ManageableUser.js @@ -45,6 +45,17 @@ angular.module('manage').factory('ManageableUser', [function defineManageableUse * @type User */ this.user = template.user; + + /** + * Return true if the underlying user account is disabled, otherwise + * return false. + * + * @returns + * True if the underlying user account is disabled, otherwise false. + */ + this.isDisabled = function isDisabled() { + return template.user.disabled; + }; }; diff --git a/guacamole/src/main/frontend/src/app/rest/types/User.js b/guacamole/src/main/frontend/src/app/rest/types/User.js index 3ca138d3b9..c74d1cd8a1 100644 --- a/guacamole/src/main/frontend/src/app/rest/types/User.js +++ b/guacamole/src/main/frontend/src/app/rest/types/User.js @@ -61,6 +61,13 @@ angular.module('rest').factory('User', [function defineUser() { * @type Number */ this.lastActive = template.lastActive; + + /** + * True if this user account is disabled, otherwise false. + * + * @type boolean + */ + this.disabled = template.disabled; /** * Arbitrary name/value pairs which further describe this user. The diff --git a/guacamole/src/main/frontend/src/app/rest/types/UserGroup.js b/guacamole/src/main/frontend/src/app/rest/types/UserGroup.js index f4bf26cfec..e3bc7eae23 100644 --- a/guacamole/src/main/frontend/src/app/rest/types/UserGroup.js +++ b/guacamole/src/main/frontend/src/app/rest/types/UserGroup.js @@ -42,6 +42,13 @@ angular.module('rest').factory('UserGroup', [function defineUserGroup() { * @type String */ this.identifier = template.identifier; + + /** + * True if this user group is disabled, otherwise false. + * + * @type boolean + */ + this.disabled = template.disabled; /** * Arbitrary name/value pairs which further describe this user group. diff --git a/guacamole/src/main/frontend/src/app/settings/styles/user-group-list.css b/guacamole/src/main/frontend/src/app/settings/styles/user-group-list.css index 2040eb440a..6f29de70fa 100644 --- a/guacamole/src/main/frontend/src/app/settings/styles/user-group-list.css +++ b/guacamole/src/main/frontend/src/app/settings/styles/user-group-list.css @@ -26,11 +26,17 @@ width: 100%; } -.settings.user-groups table.user-group-list tr.user td.user-group-name a[href] { +.settings.user-groups table.user-group-list tr.user-group td.user-group-name a[href] { display: block; padding: .5em 1em; } -.settings.user-groups table.user-group-list tr.user td.user-group-name { - padding: 0; +.settings.user-groups table.user-group-list tr.user-group.disabled, +.settings.user-groups table.user-group-list tr.user-group.disabled td.user-group-name a[href] { + color: gray; + font-style: italic; } + +.settings.user-groups table.user-group-list tr.user-group td.user-group-name { + padding: 0; +} \ No newline at end of file diff --git a/guacamole/src/main/frontend/src/app/settings/styles/user-list.css b/guacamole/src/main/frontend/src/app/settings/styles/user-list.css index e130d0da18..e9631a9509 100644 --- a/guacamole/src/main/frontend/src/app/settings/styles/user-list.css +++ b/guacamole/src/main/frontend/src/app/settings/styles/user-list.css @@ -36,6 +36,12 @@ padding: .5em 1em; } +.settings.users table.user-list tr.user.disabled, +.settings.users table.user-list tr.user.disabled td.username a[href] { + color: gray; + font-style: italic; +} + .settings.users table.user-list tr.user td.username { padding: 0; -} +} \ No newline at end of file diff --git a/guacamole/src/main/frontend/src/app/settings/templates/settingsUserGroups.html b/guacamole/src/main/frontend/src/app/settings/templates/settingsUserGroups.html index ccb534e65d..4e7cd4c5a9 100644 --- a/guacamole/src/main/frontend/src/app/settings/templates/settingsUserGroups.html +++ b/guacamole/src/main/frontend/src/app/settings/templates/settingsUserGroups.html @@ -30,7 +30,7 @@ - +
diff --git a/guacamole/src/main/frontend/src/app/settings/templates/settingsUsers.html b/guacamole/src/main/frontend/src/app/settings/templates/settingsUsers.html index 18a0437826..4a178fe491 100644 --- a/guacamole/src/main/frontend/src/app/settings/templates/settingsUsers.html +++ b/guacamole/src/main/frontend/src/app/settings/templates/settingsUsers.html @@ -39,7 +39,7 @@ - +
diff --git a/guacamole/src/main/frontend/src/translations/ca.json b/guacamole/src/main/frontend/src/translations/ca.json index 3ec74359db..658c9232f0 100644 --- a/guacamole/src/main/frontend/src/translations/ca.json +++ b/guacamole/src/main/frontend/src/translations/ca.json @@ -343,6 +343,7 @@ "FIELD_HEADER_CREATE_NEW_CONNECTIONS" : "Crear noves connexions:", "FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS" : "Crear grups de connexió nous:", "FIELD_HEADER_CREATE_NEW_SHARING_PROFILES" : "Crear nous perfils per compartir:", + "FIELD_HEADER_USER_DISABLED" : "Inici de sessió desactivat:", "FIELD_HEADER_USERNAME" : "Nom d'usuari:", "HELP_NO_USER_GROUPS" : "Actualment, aquest usuari no pertany a cap grup. Amplieu aquesta secció per afegir-lo a grups.", @@ -373,6 +374,7 @@ "FIELD_HEADER_CREATE_NEW_CONNECTIONS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTIONS", "FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS", "FIELD_HEADER_CREATE_NEW_SHARING_PROFILES" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_SHARING_PROFILES", + "FIELD_HEADER_USER_GROUP_DISABLED" : "Desactivat:", "FIELD_HEADER_USER_GROUP_NAME" : "Nom del grup:", "HELP_NO_USER_GROUPS" : "Actualment aquest grup no pertany a cap grup. Amplieu aquesta secció per afegir grups.", diff --git a/guacamole/src/main/frontend/src/translations/de.json b/guacamole/src/main/frontend/src/translations/de.json index 04059693d0..e9bcab55d9 100644 --- a/guacamole/src/main/frontend/src/translations/de.json +++ b/guacamole/src/main/frontend/src/translations/de.json @@ -411,6 +411,7 @@ "FIELD_HEADER_CREATE_NEW_SHARING_PROFILES" : "Neues Verteil-Profil erstellen:", "FIELD_HEADER_PASSWORD" : "@:APP.FIELD_HEADER_PASSWORD", "FIELD_HEADER_PASSWORD_AGAIN" : "@:APP.FIELD_HEADER_PASSWORD_AGAIN", + "FIELD_HEADER_USER_DISABLED" : "Login deaktiviert:", "FIELD_HEADER_USERNAME" : "Benutzername:", "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", @@ -449,6 +450,7 @@ "FIELD_HEADER_CREATE_NEW_CONNECTIONS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTIONS", "FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS", "FIELD_HEADER_CREATE_NEW_SHARING_PROFILES" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_SHARING_PROFILES", + "FIELD_HEADER_USER_GROUP_DISABLED" : "Deaktiviert:", "FIELD_HEADER_USER_GROUP_NAME" : "Name der Benutzergruppe:", "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", diff --git a/guacamole/src/main/frontend/src/translations/en.json b/guacamole/src/main/frontend/src/translations/en.json index ade20a940c..7c2edec57a 100644 --- a/guacamole/src/main/frontend/src/translations/en.json +++ b/guacamole/src/main/frontend/src/translations/en.json @@ -416,6 +416,7 @@ "FIELD_HEADER_CREATE_NEW_SHARING_PROFILES" : "Create new sharing profiles:", "FIELD_HEADER_PASSWORD" : "@:APP.FIELD_HEADER_PASSWORD", "FIELD_HEADER_PASSWORD_AGAIN" : "@:APP.FIELD_HEADER_PASSWORD_AGAIN", + "FIELD_HEADER_USER_DISABLED" : "Login disabled:", "FIELD_HEADER_USERNAME" : "Username:", "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", @@ -454,6 +455,7 @@ "FIELD_HEADER_CREATE_NEW_CONNECTIONS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTIONS", "FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS", "FIELD_HEADER_CREATE_NEW_SHARING_PROFILES" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_SHARING_PROFILES", + "FIELD_HEADER_USER_GROUP_DISABLED" : "Disabled:", "FIELD_HEADER_USER_GROUP_NAME" : "Group name:", "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", diff --git a/guacamole/src/main/frontend/src/translations/es.json b/guacamole/src/main/frontend/src/translations/es.json index dcacb70678..b607d0b605 100644 --- a/guacamole/src/main/frontend/src/translations/es.json +++ b/guacamole/src/main/frontend/src/translations/es.json @@ -317,6 +317,7 @@ "FIELD_HEADER_CREATE_NEW_SHARING_PROFILES" : "Crear nuevos perfiles de compartir:", "FIELD_HEADER_PASSWORD" : "@:APP.FIELD_HEADER_PASSWORD", "FIELD_HEADER_PASSWORD_AGAIN" : "@:APP.FIELD_HEADER_PASSWORD_AGAIN", + "FIELD_HEADER_USER_DISABLED" : "Inicio de sesión deshabilitado:", "FIELD_HEADER_USERNAME" : "Nombre de usuario:", "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", @@ -355,6 +356,7 @@ "FIELD_HEADER_CREATE_NEW_CONNECTIONS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTIONS", "FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS", "FIELD_HEADER_CREATE_NEW_SHARING_PROFILES" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_SHARING_PROFILES", + "FIELD_HEADER_USER_GROUP_DISABLED" : "Deshabilitado:", "FIELD_HEADER_USER_GROUP_NAME" : "Nombre del grupo:", "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", diff --git a/guacamole/src/main/frontend/src/translations/fr.json b/guacamole/src/main/frontend/src/translations/fr.json index bf29043034..085d79e7f8 100644 --- a/guacamole/src/main/frontend/src/translations/fr.json +++ b/guacamole/src/main/frontend/src/translations/fr.json @@ -316,6 +316,7 @@ "FIELD_HEADER_CREATE_NEW_SHARING_PROFILES" : "Créer de nouveaux profils de partage:", "FIELD_HEADER_PASSWORD" : "@:APP.FIELD_HEADER_PASSWORD", "FIELD_HEADER_PASSWORD_AGAIN" : "@:APP.FIELD_HEADER_PASSWORD_AGAIN", + "FIELD_HEADER_USER_DISABLED" : "Connexion désactivée:", "FIELD_HEADER_USERNAME" : "Identifiant:", "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", @@ -354,6 +355,7 @@ "FIELD_HEADER_CREATE_NEW_CONNECTIONS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTIONS", "FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS", "FIELD_HEADER_CREATE_NEW_SHARING_PROFILES" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_SHARING_PROFILES", + "FIELD_HEADER_USER_GROUP_DISABLED" : "Désactivé:", "FIELD_HEADER_USER_GROUP_NAME" : "Nom Groupe:", "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", diff --git a/guacamole/src/main/frontend/src/translations/ja.json b/guacamole/src/main/frontend/src/translations/ja.json index e4c2ad0c4b..2750d38fd8 100644 --- a/guacamole/src/main/frontend/src/translations/ja.json +++ b/guacamole/src/main/frontend/src/translations/ja.json @@ -282,6 +282,7 @@ "FIELD_HEADER_CREATE_NEW_SHARING_PROFILES" : "共有プロファイルの作成:", "FIELD_HEADER_PASSWORD" : "@:APP.FIELD_HEADER_PASSWORD", "FIELD_HEADER_PASSWORD_AGAIN" : "@:APP.FIELD_HEADER_PASSWORD_AGAIN", + "FIELD_HEADER_USER_DISABLED" : "ログインの無効化:", "FIELD_HEADER_USERNAME" : "ユーザ名:", "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", @@ -320,6 +321,7 @@ "FIELD_HEADER_CREATE_NEW_CONNECTIONS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTIONS", "FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS", "FIELD_HEADER_CREATE_NEW_SHARING_PROFILES" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_SHARING_PROFILES", + "FIELD_HEADER_USER_GROUP_DISABLED" : "グループの無効化:", "FIELD_HEADER_USER_GROUP_NAME" : "グループ名:", "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", diff --git a/guacamole/src/main/frontend/src/translations/ko.json b/guacamole/src/main/frontend/src/translations/ko.json index 8b01d8559a..ac135e4405 100644 --- a/guacamole/src/main/frontend/src/translations/ko.json +++ b/guacamole/src/main/frontend/src/translations/ko.json @@ -314,6 +314,7 @@ "FIELD_HEADER_CREATE_NEW_SHARING_PROFILES" : "새로운 공유 프로파일 생성", "FIELD_HEADER_PASSWORD" : "@:APP.FIELD_HEADER_PASSWORD", "FIELD_HEADER_PASSWORD_AGAIN" : "@:APP.FIELD_HEADER_PASSWORD_AGAIN", + "FIELD_HEADER_USER_DISABLED" : "로그인 비활성화:", "FIELD_HEADER_USERNAME" : "사용자 이름:", "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", @@ -351,6 +352,7 @@ "FIELD_HEADER_CREATE_NEW_USER_GROUPS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_USER_GROUPS", "FIELD_HEADER_CREATE_NEW_CONNECTIONS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTIONS", "FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS", + "FIELD_HEADER_USER_GROUP_DISABLED" : "비활성화:", "FIELD_HEADER_USER_GROUP_NAME" : "그룹 이름:", "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", diff --git a/guacamole/src/main/frontend/src/translations/pl.json b/guacamole/src/main/frontend/src/translations/pl.json index 6f999697b4..bda29e05e1 100644 --- a/guacamole/src/main/frontend/src/translations/pl.json +++ b/guacamole/src/main/frontend/src/translations/pl.json @@ -326,6 +326,7 @@ "FIELD_HEADER_CREATE_NEW_SHARING_PROFILES" : "Tworzenie nowych profili udostępniania:", "FIELD_HEADER_PASSWORD" : "@:APP.FIELD_HEADER_PASSWORD", "FIELD_HEADER_PASSWORD_AGAIN" : "@:APP.FIELD_HEADER_PASSWORD_AGAIN", + "FIELD_HEADER_USER_DISABLED" : "Logowanie zablokowane:", "FIELD_HEADER_USERNAME" : "Nazwa użytkownika:", "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", @@ -364,6 +365,7 @@ "FIELD_HEADER_CREATE_NEW_CONNECTIONS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTIONS", "FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS", "FIELD_HEADER_CREATE_NEW_SHARING_PROFILES" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_SHARING_PROFILES", + "FIELD_HEADER_USER_DISABLED" : "Wyłączona:", "FIELD_HEADER_USER_GROUP_NAME" : "Nazwa grupy:", "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", diff --git a/guacamole/src/main/frontend/src/translations/pt.json b/guacamole/src/main/frontend/src/translations/pt.json index 9cebddf262..2cf9b4f205 100644 --- a/guacamole/src/main/frontend/src/translations/pt.json +++ b/guacamole/src/main/frontend/src/translations/pt.json @@ -318,6 +318,7 @@ "FIELD_HEADER_CREATE_NEW_SHARING_PROFILES" : "Criar novos perfis de compartilhamento:", "FIELD_HEADER_PASSWORD" : "@:APP.FIELD_HEADER_PASSWORD", "FIELD_HEADER_PASSWORD_AGAIN" : "@:APP.FIELD_HEADER_PASSWORD_AGAIN", + "FIELD_HEADER_USER_DISABLED" : "Login desativado:", "FIELD_HEADER_USERNAME" : "Usuário:", "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", @@ -356,6 +357,7 @@ "FIELD_HEADER_CREATE_NEW_CONNECTIONS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTIONS", "FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS", "FIELD_HEADER_CREATE_NEW_SHARING_PROFILES" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_SHARING_PROFILES", + "FIELD_HEADER_USER_GROUP_DISABLED" : "Desativado:", "FIELD_HEADER_USER_GROUP_NAME" : "Nome do grupo:", "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", diff --git a/guacamole/src/main/frontend/src/translations/ru.json b/guacamole/src/main/frontend/src/translations/ru.json index 7243e94972..a086f73390 100644 --- a/guacamole/src/main/frontend/src/translations/ru.json +++ b/guacamole/src/main/frontend/src/translations/ru.json @@ -309,6 +309,7 @@ "FIELD_HEADER_CREATE_NEW_SHARING_PROFILES" : "Создание нового профиля расшаривания:", "FIELD_HEADER_PASSWORD" : "@:APP.FIELD_HEADER_PASSWORD", "FIELD_HEADER_PASSWORD_AGAIN" : "@:APP.FIELD_HEADER_PASSWORD_AGAIN", + "FIELD_HEADER_USER_DISABLED" : "Аккаунт отключен:", "FIELD_HEADER_USERNAME" : "Имя пользователя:", "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", @@ -347,6 +348,7 @@ "FIELD_HEADER_CREATE_NEW_CONNECTIONS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTIONS", "FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS", "FIELD_HEADER_CREATE_NEW_SHARING_PROFILES" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_SHARING_PROFILES", + "FIELD_HEADER_USER_GROUP_DISABLED" : "Группа отключена:", "FIELD_HEADER_USER_GROUP_NAME" : "Название:", "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", diff --git a/guacamole/src/main/frontend/src/translations/zh.json b/guacamole/src/main/frontend/src/translations/zh.json index 72b7cb3842..76e9a2a810 100644 --- a/guacamole/src/main/frontend/src/translations/zh.json +++ b/guacamole/src/main/frontend/src/translations/zh.json @@ -406,6 +406,7 @@ "FIELD_HEADER_CREATE_NEW_SHARING_PROFILES" : "新建共享设定:", "FIELD_HEADER_PASSWORD" : "@:APP.FIELD_HEADER_PASSWORD", "FIELD_HEADER_PASSWORD_AGAIN" : "@:APP.FIELD_HEADER_PASSWORD_AGAIN", + "FIELD_HEADER_USER_DISABLED" : "已禁用登录:", "FIELD_HEADER_USERNAME" : "用户名:", "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", @@ -444,7 +445,8 @@ "FIELD_HEADER_CREATE_NEW_CONNECTIONS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTIONS", "FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS", "FIELD_HEADER_CREATE_NEW_SHARING_PROFILES" : "@:MANAGE_USER.FIELD_HEADER_CREATE_NEW_SHARING_PROFILES", - "FIELD_HEADER_USER_GROUP_NAME" : "用户组名称:", + "FIELD_HEADER_USER_GROUP_DISABLED" : "禁用:", + "FIELD_HEADER_USER_GROUP_NAME" : "用户组名称:", "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", @@ -1130,4 +1132,4 @@ } -} \ No newline at end of file +} From 732a4c5762557b8ce12c47b0939401f98e352d24 Mon Sep 17 00:00:00 2001 From: Virtually Nick Date: Sun, 3 Dec 2023 08:42:56 -0500 Subject: [PATCH 6/6] GUACAMOLE-1479: Move disabled methods up to new Disableable interface. --- .../auth/jdbc/sharing/user/SharedUser.java | 22 --------- .../guacamole/net/auth/Disableable.java | 48 +++++++++++++++++++ .../org/apache/guacamole/net/auth/User.java | 19 +------- .../apache/guacamole/net/auth/UserGroup.java | 21 +------- .../guacamole/net/auth/simple/SimpleUser.java | 22 --------- .../net/auth/simple/SimpleUserGroup.java | 22 --------- 6 files changed, 50 insertions(+), 104 deletions(-) create mode 100644 guacamole-ext/src/main/java/org/apache/guacamole/net/auth/Disableable.java diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/sharing/user/SharedUser.java b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/sharing/user/SharedUser.java index 5dcd8740d5..80d22198cc 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/sharing/user/SharedUser.java +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/sharing/user/SharedUser.java @@ -78,28 +78,6 @@ public String getIdentifier() { public void setIdentifier(String identifier) { throw new UnsupportedOperationException("Users authenticated via share keys are immutable."); } - - /** - * {@inheritDoc} - * - *

SharedUser accounts are always enabled, as access is controlled via - * the shared token. - */ - @Override - public boolean isDisabled() { - return false; - } - - /** - * {@inheritDoc} - * - *

This method silently ignores the value passed in the disabled parameter, - * as disabling the account is done by invalidating the sharing token. - */ - @Override - public void setDisabled(boolean disabled) { - // Silently ignore the parameter - } @Override public Map getAttributes() { diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/Disableable.java b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/Disableable.java new file mode 100644 index 0000000000..e515bc8ca0 --- /dev/null +++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/Disableable.java @@ -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. + } + +} diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java index 9cdec2a073..d658bb08ca 100644 --- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java +++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java @@ -29,7 +29,7 @@ /** * 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 @@ -79,23 +79,6 @@ public static class Attribute { * @param password The password to set. */ public void setPassword(String password); - - /** - * Returns true if this user account is disabled, otherwise false. - * - * @return - * True if this user account is disabled, otherwise false. - */ - public boolean isDisabled(); - - /** - * Set the disabled status of this account to the boolean parameter as - * provided, true if the account should be disabled, otherwise false. - * - * @param disabled - * True if the account should be disabled, otherwise false. - */ - public void setDisabled(boolean disabled); /** * Returns the date and time that this user was last active. If the user diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/UserGroup.java b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/UserGroup.java index cbb26a9e89..840c386f35 100644 --- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/UserGroup.java +++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/UserGroup.java @@ -26,27 +26,8 @@ * 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 true if the user group is disabled, making membership in the group - * ineffective, meaning that any permissions or other group membership - * assigned to this group will not apply to member groups and users. - * - * @return - * True if the group is disabled, otherwise false. - */ - public boolean isDisabled(); - - /** - * Set the disabled status of the user group, passing a boolean true value - * if the user group should be disabled, otherwise false. - * - * @param disabled - * True if the user group should be disabled, otherwise false. - */ - public void setDisabled(boolean disabled); - /** * Returns a set of all readable user groups of which this user group is a * member. If permission is granted for the current user to modify the diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleUser.java b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleUser.java index 9274ea23f5..8e349e27cb 100644 --- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleUser.java +++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleUser.java @@ -64,28 +64,6 @@ public SimpleUser() { public SimpleUser(String username) { super.setIdentifier(username); } - - /** - * {@inheritDoc} - * - *

This User implementation is always enabled, so this method will - * always return false. - */ - @Override - public boolean isDisabled() { - return false; - } - - /** - * {@inheritDoc} - * - *

This User implementation is always enabled, so this method will - * silently ignore the value passed in under the disabled parameter. - */ - @Override - public void setDisabled(boolean disabled) { - // Silently ignore disabled value - } /** * Adds a new READ permission to the given set of permissions for each of diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleUserGroup.java b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleUserGroup.java index f06eabfe11..be52d16420 100644 --- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleUserGroup.java +++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleUserGroup.java @@ -43,27 +43,5 @@ public SimpleUserGroup() { public SimpleUserGroup(String identifier) { super.setIdentifier(identifier); } - - /** - * {@inheritDoc} - * - *

This implementation of UserGroup is always enabled, so this will - * always return false. - */ - @Override - public boolean isDisabled() { - return false; - } - - /** - * {@inheritDoc} - * - *

This implementation of UserGroup is always enabled, so this method - * will silently ignore the value passed in the disabled parameter. - */ - @Override - public void setDisabled(boolean disabled) { - // Silently ignore as the UserGroup implementation is always enabled. - } }