Le 19/10/2016 à 08:11, franck.rakotonindra...@fresenius-kabi.com a écrit :


__________________


Ok but I a do not understand how to write  this condition

<propertiesBasedSyncOptions>
<mainIdentifier>js: "CN=" + capitalize(srcBean.getDatasetFirstValueById("cn")) + ",OU=INTERNE,OU=UserAccounts,DC=DOMAIN,DC=my"</mainIdentifier>

<defaultDelimiter>;</defaultDelimiter>
<defaultPolicy>FORCE</defaultPolicy>
        <conditions>
<create>true</create>
<update>true</update>
<delete>true</delete>
<changeId>true</changeId>
        </conditions>


I suppose I should replace the value which is TRUE to a test, it would be kind if you could show me an example



For example:

<create>
    <![CDATA[
        var result = true;

        var dn = srcBean.getDatasetFirstValueById("entryDN");
        var regexp = /ou=projects/i;
        if ( dn.match(regexp) ) { result = false; }

        result;
    ]]>
</create>


Be sure to add entryDN in source fetchedAttributes to be able to use its value in the test.

--
Clément OUDOT
Consultant en logiciels libres, Expert infrastructure et sécurité
Savoir-faire Linux
137 boulevard de Magenta - 75008 PARIS
Blog: http://sflx.ca/coudot

_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
lsc-users@lists.lsc-project.org
http://lists.lsc-project.org/listinfo/lsc-users

Reply via email to