mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-1239: Remove per-extension configuration for case-sensitivity, retaining only global configuration.
This commit is contained in:
@@ -362,26 +362,5 @@ public class ConfigurationService {
|
||||
throw new GuacamoleServerException("Unknown host specified for NAS IP.", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the usernames provided to the RADIUS authentication
|
||||
* module should be treated as case-sensitive, or false if usernames
|
||||
* should be treated as case-insensitive. The default value is read from
|
||||
* Guacamole's global configuration, which defaults to true, but can be
|
||||
* overridden for the RADIUS extension, if desired.
|
||||
*
|
||||
* @return
|
||||
* true if usernames should be treated as case-sensitive, otherwise
|
||||
* false.
|
||||
*
|
||||
* @throws GuacamoleException
|
||||
* If guacamole.properties cannot be parsed.
|
||||
*/
|
||||
public boolean getCaseSensitiveUsernames() throws GuacamoleException {
|
||||
return environment.getProperty(
|
||||
RadiusGuacamoleProperties.RADIUS_CASE_SENSITIVE_USERNAMES,
|
||||
environment.getCaseSensitiveUsernames()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -204,18 +204,5 @@ public class RadiusGuacamoleProperties {
|
||||
public String getName() { return "radius-nas-ip"; }
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* A property used to configure whether or not usernames within the RADIUS
|
||||
* module should be treated as case-sensitive.
|
||||
*/
|
||||
public static final BooleanGuacamoleProperty RADIUS_CASE_SENSITIVE_USERNAMES =
|
||||
new BooleanGuacamoleProperty() {
|
||||
|
||||
@Override
|
||||
public String getName() { return "radius-case-sensitive-usernames"; }
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
@@ -63,7 +63,7 @@ public class AuthenticatedUser extends AbstractAuthenticatedUser {
|
||||
*/
|
||||
public void init(Credentials credentials) {
|
||||
this.credentials = credentials;
|
||||
setIdentifier(credentials.getUsername().toLowerCase());
|
||||
setIdentifier(credentials.getUsername());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -75,18 +75,5 @@ public class AuthenticatedUser extends AbstractAuthenticatedUser {
|
||||
public Credentials getCredentials() {
|
||||
return credentials;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCaseSensitive() {
|
||||
try {
|
||||
return confService.getCaseSensitiveUsernames();
|
||||
}
|
||||
catch (GuacamoleException e) {
|
||||
LOGGER.error("Error retrieving configuration for username case sensiivity. "
|
||||
+ "Usernames will be processed as case-sensitive.");
|
||||
LOGGER.debug("Exception caught while retrieving RADIUS configuration.", e);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user