Hello all,
i want to sync netgroups from an old directory to a new one.
I want to do a 1:1 sync for netgroups starting with a P and then four
digits (e.g. P0010).
Other netgroups (e.g. Backup, ctixos) should be mapped to new
Pxxxx-Groups naming convention (e.g. backup => P1100)
For the mapping i use a associative array: groupmap.
Finally there are some netgroups that shall vanish. These groups are
neither defined in the mapgroup hash nor are they starting with a P.
So there is no defined mainidentifier.
These netgroups will occur the following way in the directory:
cn=undefined,ou=netgroupsynced,dc=example,dc=com
Is there a better way to do this ?
Can i put the javascript code outside the lsc.xml ?
Thanks in advance.
Regards
Uli
<mainIdentifier>
js:
var group=srcBean.getDatasetFirstValueById("cn");
var groupmap= {
"backup" : "P1100",
"
"ctixos" : "P1110"
};
if( group.match(/^P\d{4}$/))
{
"cn=" + srcBean.getDatasetFirstValueById("cn") +
",ou=netgroupsynced,dc=example,dc=com"
}
else
{
"cn=" +
groupmap[srcBean.getDatasetFirstValueById("cn")] +
",ou=netgroupsynced,dc=example,dc=com"
}
</mainIdentifier>
--
===================================
Ulrich Tehrani
Am Ulrichshof 19
79189 Bad Krozingen
+497633806246
[email protected]
===================================
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org
lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users