Author: norman
Date: Wed Dec 20 00:25:51 2006
New Revision: 488953
URL: http://svn.apache.org/viewvc?view=rev&rev=488953
Log:
Check if manageGroupAttr is set to true before try to get groupAttr. See
JAMES-748
Modified:
james/server/trunk/src/java/org/apache/james/userrepository/UsersLDAPRepository.java
Modified:
james/server/trunk/src/java/org/apache/james/userrepository/UsersLDAPRepository.java
URL:
http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/userrepository/UsersLDAPRepository.java?view=diff&rev=488953&r1=488952&r2=488953
==============================================================================
---
james/server/trunk/src/java/org/apache/james/userrepository/UsersLDAPRepository.java
(original)
+++
james/server/trunk/src/java/org/apache/james/userrepository/UsersLDAPRepository.java
Wed Dec 20 00:25:51 2006
@@ -58,7 +58,7 @@
*/
public class UsersLDAPRepository
extends AbstractLogEnabled
- implements UsersRepository, Serviceable, Configurable, Initializable{
+ implements UsersRepository, Configurable, Initializable{
private DirContext ctx;
@@ -81,13 +81,6 @@
private String passwordAttr;
/**
- * @see
org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
- */
- public void service(ServiceManager compMgr) {
- // this.comp = compMgr;
- }
-
- /**
* @see
org.apache.avalon.framework.configuration.Configurable#configure(Configuration)
*/
public void configure(Configuration conf)
@@ -107,7 +100,12 @@
membersAttr = conf.getChild("MembersAttribute").getValue();
manageGroupAttr
= conf.getChild("ManageGroupAttribute").getValueAsBoolean( false );
- groupAttr = conf.getChild("GroupAttribute").getValue();
+
+ // Check if groupAttr is needed
+ if (manageGroupAttr == true) {
+ groupAttr = conf.getChild("GroupAttribute").getValue();
+ }
+
managePasswordAttr =
conf.getChild("ManagePasswordAttribute").getValueAsBoolean( false );
passwordAttr = conf.getChild("PasswordAttribute").getValue();
}
@@ -138,7 +136,6 @@
baseURL = urlBuffer.toString() + baseNodeDN;
getLogger().info("Creating initial context from " + baseURL);
- //System.out.println("Creating initial context from " + baseURL);
Hashtable env = new Hashtable();
env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]