2014-10-20 13:50 GMT+02:00 <[email protected]>: > Hi Clement , > > Thanks for the quick reply. > If i have 3 different tasks for user sync,group sync and the user_group > sync, that would work, but that does not satisfy the use-case that i am > aiming for. Is there no way in which I can do the following: > > 1)sync Groups, fetch its member attr, then for each of the members do an > ldap search in ou=Users and fetch its attributes? >
Yes you can, with ScriptableJndiServices: http://lsc-project.org/javadoc/2.0-SNAPSHOT/org/lsc/jndi/ScriptableJndiServices.html For example; here is a code to map a source DN with a destination DN (attribute manager) : <dataset> <name>manager</name> <policy>FORCE</policy> <forceValues> <string><![CDATA[js: var manager = srcBean.getDatasetFirstValueById("manager"); var adManager; if ( manager.length() ) { try { var uid = srcLdap.attribute(manager, "uid").get(0); var res = ldap.list( "ou=users,ou=demo", "(sAMAccountName="+uid+")" ).get(0); adManager = res + "," +ldap.getContextDn(); } catch (e) {}; } adManager; ]]></string> </forceValues> </dataset> > 2)I also understand that i will have to make some changes to the SqlMap i > have constructed in this scenario(as it will no longer deal with just 1 > table in this case).If there is a way to achieve 1) then what changes do i > make to the SQLMAp? > > With 1) you will get an array of values for your dataset. I don't know how to use this array inside the sqlmap. We usually push only single values inside databases. Clément.
_______________________________________________________________ Ldap Synchronization Connector (LSC) - http://lsc-project.org lsc-users mailing list [email protected] http://lists.lsc-project.org/listinfo/lsc-users

