Repository: guacamole-client Updated Branches: refs/heads/master 9b5701cd6 -> d6adc07dc
GUACAMOLE-494: Remove support for "basic-user-mapping" property, deprecated since 0.9.10-incubating (8590a0a). Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/cbed98e8 Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/cbed98e8 Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/cbed98e8 Branch: refs/heads/master Commit: cbed98e849c8104f500a94d8f47b8e86c6b921c3 Parents: 07d0307 Author: Michael Jumper <mjum...@apache.org> Authored: Thu Feb 1 22:42:36 2018 -0800 Committer: Michael Jumper <mjum...@apache.org> Committed: Thu Feb 1 22:42:36 2018 -0800 ---------------------------------------------------------------------- .../auth/file/FileAuthenticationProvider.java | 44 ++------------------ 1 file changed, 4 insertions(+), 40 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/cbed98e8/guacamole/src/main/java/org/apache/guacamole/auth/file/FileAuthenticationProvider.java ---------------------------------------------------------------------- diff --git a/guacamole/src/main/java/org/apache/guacamole/auth/file/FileAuthenticationProvider.java b/guacamole/src/main/java/org/apache/guacamole/auth/file/FileAuthenticationProvider.java index 27d3411..5f0bbda 100644 --- a/guacamole/src/main/java/org/apache/guacamole/auth/file/FileAuthenticationProvider.java +++ b/guacamole/src/main/java/org/apache/guacamole/auth/file/FileAuthenticationProvider.java @@ -31,7 +31,6 @@ import org.apache.guacamole.environment.LocalEnvironment; import org.apache.guacamole.net.auth.Credentials; import org.apache.guacamole.net.auth.simple.SimpleAuthenticationProvider; import org.apache.guacamole.xml.DocumentHandler; -import org.apache.guacamole.properties.FileGuacamoleProperty; import org.apache.guacamole.protocol.GuacamoleConfiguration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -70,20 +69,6 @@ public class FileAuthenticationProvider extends SimpleAuthenticationProvider { private final Environment environment; /** - * The XML file to read the user mapping from. This property has been - * deprecated, as the name "basic" is ridiculous, and providing for - * configurable user-mapping.xml locations is unnecessary complexity. Use - * GUACAMOLE_HOME/user-mapping.xml instead. - */ - @Deprecated - public static final FileGuacamoleProperty BASIC_USER_MAPPING = new FileGuacamoleProperty() { - - @Override - public String getName() { return "basic-user-mapping"; } - - }; - - /** * The filename to use for the user mapping. */ public static final String USER_MAPPING_FILENAME = "user-mapping.xml"; @@ -107,38 +92,17 @@ public class FileAuthenticationProvider extends SimpleAuthenticationProvider { /** * Returns a UserMapping containing all authorization data given within - * the XML file specified by the "basic-user-mapping" property in - * guacamole.properties. If the XML file has been modified or has not yet - * been read, this function may reread the file. + * GUACAMOLE_HOME/user-mapping.xml. If the XML file has been modified or has + * not yet been read, this function may reread the file. * * @return * A UserMapping containing all authorization data within the user * mapping XML file, or null if the file cannot be found/parsed. */ - @SuppressWarnings("deprecation") // We must continue to use the "basic-user-mapping" property until it is truly no longer supported private UserMapping getUserMapping() { - // Get user mapping file, defaulting to GUACAMOLE_HOME/user-mapping.xml - File userMappingFile; - try { - - // Continue supporting deprecated property, but warn in the logs - userMappingFile = environment.getProperty(BASIC_USER_MAPPING); - if (userMappingFile != null) - logger.warn("The \"basic-user-mapping\" property is deprecated. Please use the \"GUACAMOLE_HOME/user-mapping.xml\" file instead."); - - // Read user mapping from GUACAMOLE_HOME - if (userMappingFile == null) - userMappingFile = new File(environment.getGuacamoleHome(), USER_MAPPING_FILENAME); - - } - - // Abort if property cannot be parsed - catch (GuacamoleException e) { - logger.warn("Unable to read user mapping filename from properties: {}", e.getMessage()); - logger.debug("Error parsing user mapping property.", e); - return null; - } + // Read user mapping from GUACAMOLE_HOME/user-mapping.xml + File userMappingFile = new File(environment.getGuacamoleHome(), USER_MAPPING_FILENAME); // Abort if user mapping does not exist if (!userMappingFile.exists()) {