[Building Sakai] MultipleEmailLdapAttributeMapper sample
Steve Swinsburg
steve.swinsburg at gmail.com
Thu Oct 6 15:31:58 PDT 2011
Hi Rosa,
Turn on debug level logging for the JLDAPDirectoryProfvider in sakai.properties
You should just be able to add the extra param in the attributeMappings and then add a bit of logic that if either is set then that value is used. That is how the preferredFirstName field works.
cheers,
Steve
On 07/10/2011, at 1:45 AM, Rosa María Silveira Puertas wrote:
> Hi all,
>
> We have Sakai 2.8 at Universidad Complutense and I’m trying to set jldap-beans.xml to get email for external users from one of these two ldaps attributes: mail or mailAlternateAddress.
> At jldap-beans.xml I have this:
>
> <bean id="edu.amc.sakai.user.LdapAttributeMapper"
> class="edu.amc.sakai.user.MultipleEmailLdapAttributeMapper"
> init-method="init"
> singleton="true">
>
> <!-- A typical set of attribute mappings. Keys are logical
> names expected by the application. Values are physical LDAP
> attribute names. If not specified or empty, defaults to
> AttributeMappingConstants.DEFAULT_ATTR_MAPPINGS. -->
> <property name="attributeMappings">
> <map>
> <entry key="login"><value>ucmAuthOwnerID</value></entry>
> <entry key="firstName"><value>givenName</value></entry>
> <entry key="preferredFirstName"><value>preferredName</value></entry>
> <entry key="lastName"><value>sn</value></entry>
> <entry key="email"><value>XXXXXXXXXXXXXX</value></entry>
> <entry key="groupMembership"><value>groupMembership</value></entry>
> <entry key="jpegPhoto"><value>jpegPhoto</value></entry>
> </map>
> </property>
>
> <!-- Several options for calculating Sakai user types based
> on LDAP attributes. Defaults to an instance of EmptyStringUserTypeMapper -->
> <property name="userTypeMapper">
> <!-- Select one of the following beans -->
> <ref bean="edu.amc.sakai.user.EmptyStringUserTypeMapper" />
> <!-- ref bean="edu.amc.sakai.user.EntryAttributeToUserTypeMapper" /-->
> <!-- ref bean="edu.amc.sakai.user.EntryContainerRdnToUserTypeMapper" /-->
> <!-- ref bean="edu.amc.sakai.user.StringUserTypeMapper" /-->
> </property>
>
> </bean>
>
> Instead of XXXXXXXXXXXXXXXXXXXXX I have tried with:
>
> · mail,mailAlternateAddress
> · mail|mailAlternateAddress
> · (mail)(mailAlternateAddress)
> · |(mail=*)(mailAlternateAddress=*)
> · \(mail=*)(mailAlternateAddress=*)
> · …….
>
> And I get this error at tomcat log: WARN http-80-Processor9 edu.amc.sakai.user.JLDAPDirectoryProvider - An error occurred searching for users: com.novell.ldap.LDAPLocalException: (87) Error del filtro
>
> Do you know where I could find some examples of how setting this? Or anyone who could help me if you can’t?
>
> Thank you very much in advance and best regards, Rosa
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20111007/51298177/attachment.html
More information about the sakai-dev
mailing list