Hi,

I am facing troubles debugging my js for a <dataset> field.

Using <dataset>, I want to update the attribute "title" of all synchronized 
users on dest LDAP depending on whether this user is a "uniqueMember" in that 
groupOfUniqueNames. If yes, I want to write "contributor", else I want to write 
"reader".

[cid:[email protected]]

I tried what I wrote below, but I'm think I'm using this wrong. Could anyone 
please guide me ?

<dataset>
                <name>title</name>
                <policy>FORCE</policy>
                <forceValues>
                               <string><![CDATA[js:
                                var userRole = 
srcBean.getDatasetFirstValueById("title");
                                 if (userRole == "user") {
var ADDN = 
ldap.search("cn=contributor,dmdName=roles,cn=com1,dmdName=communities,dmdName=groups,dmdName=secureportal,dmdName=applications,dc=cap,dc=ad,dc=applis,dc=fr",
 "(uniqueMember=" + srcBean.getDatasetFirstValueById("uid") + ")");
                                                               if (ADDN.size() 
!= 1) {
                                                                              
"contributor";
             }
                                                               else
                                                               {
                                                                              
"reader";
                                                               }
                                               }
                                 ]]>
                               </string>
                </forceValues>
</dataset>

_______________________________________________________________________
[Email_CBE.gif]Alexandre FOUCHET
Capgemini Application Services France - Division Aérospatiale & Défense

Rennes Atalante Champs Blancs
7 rue Claude Chappe - CS 67746 - 35577 CESSON SEVIGNE CEDEX
Tel.: +33 2 99 27 98 39
www.capgemini.com<http://www.capgemini.com/>
People matter, results count.

This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient, you are not authorized 
to read, print, retain, copy, disseminate, distribute, or use this message or 
any part thereof. If you receive this message in error, please notify the 
sender immediately and delete all copies of this message.
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users

Reply via email to