> I would consider setting up a cleanFilter that do not return any entry, and,
> in the delete condition, write a script that search your entry in source
> using srcLdap.search(base,filter) : either make several searches in each of
> your synced OUs, or do a top search and check the DN of the returned entry,
> and return true only if it is not found or not within one of your synced OUs,
> false otherwise. Note that srcLdap.search append the contextDn at the end of
> the base parameter, and will remove them from returned DNs (this is not very
> explicit in the documentation). See
> https://lsc-project.org/javadoc/2.1-SNAPSHOT/org/lsc/jndi/ScriptableJndiServices.html.
>
>
I am trying to implement your suggestion but have some problems.
This is how I call my filter function:
<delete>js:deleteFilterOUs(dstBean.getDatasetFirstValueById("mail"))</delete>
In a different file I have put this code:
function deleteFilterOUs(mail) {
var filter = "mail=" + mail;
var results = srcLdap.search(srcLdap.base, filter);
java.lang.System.out.println(results);
java.lang.System.out.println(mail);
return false;
}
I can see that the correct mail is printed but results is null.
Did I call the search function with the correct parameters?
Also, I didn't quite understand your remark about search() appending
the contextDn.
Thanks,
Lior.
_______________________________________________________________
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