Saturday 19 July 2014

Map a standard LDAP attribute using JavaScript for external users

1. In map_dbrepos_from_source.properites, comment out this line: displayName=cn

2. In map_dbrepos_from_source.properites, Add/uncomment out this line:

mode= {func_check_employee_type}

displayName={func_decorate_displayName_if_visitor}

displayNameLdapAttr=cn

decorateVisitorDisplayName= - External User

3. Add {func_check_employee_type} function in profiles_functions.js.

function func_check_employee_type (fieldName) {

var retval = "internal" ;

//get employeeNumber - must be LDAP attr

var empType = work.getString( " employeeType " );

if (empType!=null)

{

if (empType=="external")

retval = "external" ;

}

return retval;

}

clip_image002[1]

4. Run sync_all_dns.bat

5. In EMPLOYEE table, PROF_EMPLOYEE_TYPE is mapped as external/internal

clip_image004[1]

clip_image006[1]

No comments:

Post a Comment