You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by mj...@apache.org on 2017/03/28 16:29:53 UTC

[4/7] incubator-guacamole-client git commit: GUACAMOLE-101: Remove connection search filter changes.

GUACAMOLE-101: Remove connection search filter changes.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/db9876e7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/db9876e7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/db9876e7

Branch: refs/heads/master
Commit: db9876e736a08a5be538e4b5a45de19e906cd543
Parents: 5c76838
Author: Nick Couchman <vn...@apache.org>
Authored: Tue Mar 28 07:50:08 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Tue Mar 28 07:56:52 2017 -0400

----------------------------------------------------------------------
 .../auth/ldap/ConfigurationService.java         | 20 --------------------
 .../auth/ldap/LDAPGuacamoleProperties.java      | 10 ----------
 .../auth/ldap/connection/ConnectionService.java |  6 ++----
 3 files changed, 2 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/db9876e7/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java
index eec0324..c7e4819 100644
--- a/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java
+++ b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java
@@ -292,24 +292,4 @@ public class ConfigurationService {
         );
     }
 
-    /**
-     * Returns the search filter that should be used when querying the 
-     * LDAP server for Guacamole connections.  If no filter is specified,
-     * the default of objectClass=guacConfigGroup is returned.
-     * 
-     * @return
-     *     The search filter that should be used when querying the 
-     *     LDAP server for connections for Guacamole, or 
-     *     objectClass=guacConfigGroup if no filter is specified. 
-     *
-     * @throws GuacamoleException
-     *     If guacamole.properties cannot be parsed.
-     */
-    public String getConnectionSearchFilter() throws GuacamoleException {
-        return environment.getProperty(
-            LDAPGuacamoleProperties.LDAP_CONNECTION_SEARCH_FILTER,
-            "(objectClass=guacConfigGroup)"
-        );
-    }
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/db9876e7/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPGuacamoleProperties.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPGuacamoleProperties.java b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPGuacamoleProperties.java
index 5f49a8c..e13264d 100644
--- a/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPGuacamoleProperties.java
+++ b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPGuacamoleProperties.java
@@ -174,14 +174,4 @@ public class LDAPGuacamoleProperties {
 
     };
 
-    /**
-     * A search filter to apply to connection LDAP queries.
-     */
-    public static final StringGuacamoleProperty LDAP_CONNECTION_SEARCH_FILTER = new StringGuacamoleProperty() {
-
-        @Override
-        public String getName() { return "ldap-connection-search-filter"; }
-
-    };
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/db9876e7/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/connection/ConnectionService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/connection/ConnectionService.java b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/connection/ConnectionService.java
index 04e57f0..d256ebb 100644
--- a/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/connection/ConnectionService.java
+++ b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/connection/ConnectionService.java
@@ -227,9 +227,7 @@ public class ConnectionService {
         StringBuilder connectionSearchFilter = new StringBuilder();
 
         // Add the prefix to the search filter, prefix filter searches for guacConfigGroups with the userDN as the member attribute value
-        connectionSearchFilter.append("(&");
-        connectionSearchFilter.append(confService.getConnectionSearchFilter());
-        connectionSearchFilter.append("(|(member=");
+        connectionSearchFilter.append("(&(objectClass=guacConfigGroup)(|(member=");
         connectionSearchFilter.append(escapingService.escapeLDAPSearchFilter(userDN));
         connectionSearchFilter.append(")");
 
@@ -241,7 +239,7 @@ public class ConnectionService {
             LDAPSearchResults userRoleGroupResults = ldapConnection.search(
                 groupBaseDN,
                 LDAPConnection.SCOPE_SUB,
-                "(&(!" + confService.getConnectionSearchFilter() + ")(member=" + escapingService.escapeLDAPSearchFilter(userDN) + "))",
+                "(&(!(objectClass=guacConfigGroup))(member=" + escapingService.escapeLDAPSearchFilter(userDN) + "))",
                 null,
                 false,
                 confService.getLDAPSearchConstraints()