Hi

When I store users in my destination, I store them in lower case.
Some of the users in the source AD has upper case in their e-mail and
LSC always syncs them to the destination on each run.
I am using this as the main id:
<mainIdentifier>"mail=" +
srcBean.getDatasetFirstValueById("mail".toLowerCase())</mainIdentifier>

but LSC still thinks it needs to sync those users.

I have followed this guide:
https://lsc-project.org/documentation/2.0/configuration/syncoptions

and tried different Force/Keep/Merge values for the sn, GivenName and
mail which are the fields I want to sync.

My question is how can I make LSC ignore the case of the e-mail field
and only sync users if the e-mail, sn or givenName really changed?
My configuration is below.

Thanks,
Lior.

<propertiesBasedSyncOptions>
<mainIdentifier>js:"mail=" +
srcBean.getDatasetFirstValueById("mail").toLowerCase()</mainIdentifier>
<defaultDelimiter>,</defaultDelimiter>
<defaultPolicy>MERGE</defaultPolicy>
<dataset>
<name>mobile</name>
</dataset>
<dataset>
<name>givenName</name>
                       <policy>FORCE</policy>
                        <defaultValues></defaultValues>
                        <forceValues>
                                <string>
                                <![CDATA[rjs:
                                var gname =
srcBean.getDatasetValuesById("givenName");
                                n = String(gname).slice(1, -1);
                                n.trim().replace(/[^\x00-\x7F]/g, "");
                                ]]>
                                </string>
                        </forceValues>
                </dataset>
                <dataset>
                        <name>sn</name>
                        <policy>FORCE</policy>
                        <defaultValues></defaultValues>
                        <forceValues>
                                <string>
                                <![CDATA[rjs:
                                var lname = srcBean.getDatasetValuesById("sn");
                                l = String(lname).slice(1, -1);
                                l.trim().replace(/[^\x00-\x7F]/g, "");
                                ]]>
                                </string>
                        </forceValues>
</dataset>
<dataset>
<name>objectClass</name>
<policy>KEEP</policy>
<createValues>
<string>"inetOrgPerson"</string>
<string>"organizationalPerson"</string>
<string>"person"</string>
<string>"top"</string>
</createValues>
</dataset>
<dataset>
<name>default</name>
<policy>FORCE</policy>
</dataset>
<dataset>
<name>mail</name>
<policy>FORCE</policy>
<defaultValues></defaultValues>
                    <forceValues>
                        <string>
                        <![CDATA[rjs:
                        var memberMail = srcBean.getDatasetValuesById("mail");
                        mail = String(memberMail).slice(1, -1);
                        mail.toLowerCase()
                        ]]>
                        </string>
                    </forceValues>
</dataset>
</propertiesBasedSyncOptions>
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
[email protected]
https://lists.lsc-project.org/cgi-bin/mailman/listinfo/lsc-users

Reply via email to