|
Our university has a computed Ldap attribute that returns all the
groups that a particular user belongs to. This is in turn mapped to
PAGS and used to target DLM fragments to our users. Because this
attribute is computed, it is not returned by an "*" attributes query. I have played around with the LdapPersonAttributeDaoImpl.java file in an attempt to force that attribute to be queried. I eventually got it working but it seems that now the other Ldap attributes are not being returned. Can anyone help point me in the proper direction to obtain this new behavior. For additional help, I am including my changed section of the java file. ... String[] currentAttributes = sc.getReturningAttributes(); int currentAttributesSize = 0; if (currentAttributes != null) currentAttributesSize = currentAttributes.length; String[] newAttributes = new String[currentAttributesSize + 1]; if (currentAttributes != null) System.arraycopy(currentAttributes, 0, newAttributes, 0, currentAttributesSize); // Attempting to add our custom attribute forcing its return newAttributes[newAttributes.length - 1] = "posixIsMemberOf"; sc.setReturningAttributes(newAttributes); //Can't just to a toArray here since the order of the keys in the Map //may not match the order of the keys in the List and it is important to //the query. final Object[] args = new Object[this.queryAttributes.size()]; for (int index = 0; index < args.length; index++) { final String attrName = (String)this.queryAttributes.get(index); args[index] = seed.get(attrName); } String argsValues = ""; for (int j=0; j<args.length; j++) argsValues += args[j].toString() + " "; ... Thanks for the help. Paul -- |
