mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-101: Remove connection search filter changes.
This commit is contained in:
@@ -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)"
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -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"; }
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user