Hi David,
thanks for your answer.
So I tried checking when getting the dn of the User if "OU=Partner" is part of
the string. If not return true.
It seems I did something wrong. But I am not quite sure what to make of this
error message:
on id=CN=Name
Surname,OU=Partner,OU=External,OU=Employees,OU=Users,DC=AD,DC=DE
Reason: javax.script.ScriptException: TypeError: user.includes is not a
function in <eval> at line number 8
Jan 12 10:08:23 - ERROR - Error while synchronizing ID
{samaccountname=nsu-ext}: org.lsc.exception.LscServiceException:
javax.script.ScriptException: TypeError: user.includes is not a function in
<eval> at line number 8
Jan 12 10:08:23 - ERROR - Fail to compute expression:
{
var user = srcBean.getMainIdentifier();
var check = !user.includes("OU=Partner");
}
check
My create condition:
<create>
<![CDATA[{
var user = srcBean.getMainIdentifier();
var check = !user.includes("ou=Partner");
}
check
]]>
</create>
Colin
-----Ursprüngliche Nachricht-----
Von: David Coutadeur [mailto:[email protected]]
Gesendet: Freitag, 12. Januar 2018 09:45
An: [email protected]; Thorn, Colin <[email protected]>
Betreff: Re: [lsc-users] OU sync
Hi Colin,
You could use create and update condition tags.
Inside these tags, you could write code that compute the tree level of your
entry and return TRUE only if the level is "External". (or lvl=4 in your
example)
David
Le 12/01/2018 09:30, Thorn, Colin a écrit :
> Hello,
>
> I have a question regarding the sync of OUs.
> Currently I have a OU I sync called External. In this OU some Users were,
> which I did not want to sync, so I moved them into a OU called Partner one
> level lower.
> The structure looks somewhat like this.
> Server
> Users
> Employees
> External
> Partner
>
> When syncing the OU External it sync all Users from External and Partner.
> Users of both OUs are put on the destination Server into the OU External.
> Is there a possibility to stop this from happening. I only want the Users in
> External to be synced.
> Moving the OU Partner onto the same level as External is unfortunately not an
> option.
>
> Extract of my lsc.xml:
>
> <ldapDestinationService>
> <name>OpenLDAP-dst</name>
> <connection reference="projectLDAP" />
>
> <baseDn>ou=External,ou=Employees,ou=Users,dc=ldap,dc=local</baseDn>
>
>
> Kind Regards,
> Colin Thorn
>
>
>
>
>
> _______________________________________________________________
> 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
>
_______________________________________________________________
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