From 71647c475e0b4462f1303db42c5a7240dfb43f5d Mon Sep 17 00:00:00 2001 From: Manuel Rego Casasnovas Date: Thu, 12 Jan 2012 10:53:30 +0100 Subject: [PATCH] Bug #1333: Fix issue as property and search query are needed for group strategy too FEA: ItEr76S04BugFixing --- .../org/libreplan/web/common/ConfigurationController.java | 8 -------- .../users/services/LDAPCustomAuthenticationProvider.java | 3 +-- libreplan-webapp/src/main/webapp/common/configuration.zul | 6 ++---- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/common/ConfigurationController.java b/libreplan-webapp/src/main/java/org/libreplan/web/common/ConfigurationController.java index aa3065c02..e658348c8 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/common/ConfigurationController.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/common/ConfigurationController.java @@ -117,10 +117,6 @@ public class ConfigurationController extends GenericForwardComposer { private Textbox ldapGroupPath; - private Textbox ldapRoleProperty; - - private Textbox ldapSearchQuery; - private Radiogroup strategy; @Override @@ -161,13 +157,9 @@ public class ConfigurationController extends GenericForwardComposer { if (getLdapConfiguration().getLdapGroupStrategy()) { strategy.setSelectedIndex(0); ldapGroupPath.setDisabled(false); - ldapSearchQuery.setDisabled(true); - ldapRoleProperty.setDisabled(true); } else { strategy.setSelectedIndex(1); ldapGroupPath.setDisabled(true); - ldapSearchQuery.setDisabled(false); - ldapRoleProperty.setDisabled(false); } } diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/users/services/LDAPCustomAuthenticationProvider.java b/libreplan-webapp/src/main/java/org/libreplan/web/users/services/LDAPCustomAuthenticationProvider.java index 5295275c0..4fd7f4ac5 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/users/services/LDAPCustomAuthenticationProvider.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/users/services/LDAPCustomAuthenticationProvider.java @@ -341,14 +341,13 @@ public class LDAPCustomAuthenticationProvider extends String queryRoles = configuration.getLdapSearchQuery().replace( USER_ID_SUBSTITUTION, username); - String groupsPath = configuration.getLdapGroupPath(); Set rolesLdap = configuration .getConfigurationRolesLdap(); try { - if (null == groupsPath || groupsPath.isEmpty()) { + if (!configuration.getLdapGroupStrategy()) { // The LDAP has a node strategy for groups, // we must check the roleProperty in user node. return getRolesUsingNodeStrategy(rolesLdap, queryRoles, diff --git a/libreplan-webapp/src/main/webapp/common/configuration.zul b/libreplan-webapp/src/main/webapp/common/configuration.zul index 7f7841923..a63d76bcd 100644 --- a/libreplan-webapp/src/main/webapp/common/configuration.zul +++ b/libreplan-webapp/src/main/webapp/common/configuration.zul @@ -348,16 +348,14 @@