cancel
Showing results for 
Search instead for 
Did you mean: 

Ldap Sync

uesnet
Champ in-the-making
Champ in-the-making
Hi,
Is there a way to have Alfresco grab extra ldap Attributes like phone and address  while syncing? Right now is only taking the vlaues defined ldap-synchronization.properties but I am wondering is those could extended and how.
Thanks in advance,
eric.
4 REPLIES 4

abruzzi
Champ on-the-rise
Champ on-the-rise
Simple actually.  First you need to find what the attributes are named, the person type is defined in WEB-INF/classes/alfresco/model/contentModel.xml:
     <type name="cm:person">
         <title>Person</title>
         <parent>sys:base</parent>
         <properties>
            <!– The tokenisation set here is ignored - it is fixed for this type –>
            <!– This is so you can not break person lookup –>
            <property name="cm:userName">
               <type>d:text</type>
               <mandatory>true</mandatory>
               <constraints>
                  <constraint ref="cm:userNameConstraint" />
               </constraints>
            </property>
            <property name="cm:homeFolder">
               <type>d:noderef</type>
               <mandatory>true</mandatory>
            </property>
             <property name="cm:firstName">
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
            <property name="cm:lastName">
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
            <property name="cm:middleName">
               <type>d:text</type>
            </property>
            <property name="cm:email">
               <type>d:text</type>
            </property>
            <property name="cm:organizationId">
               <type>d:text</type>
            </property>
            <property name="cm:homeFolderProvider">
               <type>d:text</type>
            </property>
            <property name="cm:defaultHomeFolderPath">
               <type>d:text</type>
            </property>
            <property name="cm:presenceProvider">
                <type>d:text</type>
            </property>
            <property name="cm:presenceUsername">
                <type>d:text</type>
            </property>
            <property name="cm:organization">
                <type>d:text</type>
            </property>
            <property name="cm:jobtitle">
                <type>d:text</type>
            </property>
            <property name="cm:location">
                <type>d:text</type>
            </property>
            <property name="cm:persondescription">
                <type>d:content</type>
            </property>
            <property name="cm:telephone">
                <type>d:text</type>
            </property>
            <property name="cm:mobile">
                <type>d:text</type>
            </property>
            <property name="cm:companyaddress1">
                <type>d:text</type>
            </property>
            <property name="cm:companyaddress2">
                <type>d:text</type>
            </property>
            <property name="cm:companyaddress3">
                <type>d:text</type>
            </property>
            <property name="cm:companypostcode">
                <type>d:text</type>
            </property>
            <property name="cm:companytelephone">
                <type>d:text</type>
            </property>
            <property name="cm:companyfax">
                <type>d:text</type>
            </property>
            <property name="cm:companyemail">
                <type>d:text</type>
            </property>
            <property name="cm:skype">
                <type>d:text</type>
            </property>
            <property name="cm:instantmsg">
                <type>d:text</type>
            </property>
            …..etc……

So telephone is "cm:telephone" then you just add a new entry in extension/ldap-synchronisation-context.xml.  in the <property name="attributeMapping"> section, add somethimg like:


                <entry key="cm:telephone">
                        <value>telephoneNumber</value>
                </entry>

hope this helps.  It worked for me.

Geof

uesnet
Champ in-the-making
Champ in-the-making
worked flawlessly, thanks a bunch.
eric.

kyriakos
Champ in-the-making
Champ in-the-making
well that works for me when i view my details but as an administrator when i edit other user account i can't see telephone field…
any ideas?

ifhayz
Champ in-the-making
Champ in-the-making
well that works for me when i view my details but as an administrator when i edit other user account i can't see telephone field…
any ideas?
I have the same problem… When i sync with job title, the job title field  can't be edited but the value is null… I checked to my active directory is not null….


Please help…  Smiley Sad