cancel
Showing results for 
Search instead for 
Did you mean: 

Create home folder with LDAP organization

politrons
Champ in-the-making
Champ in-the-making
I´m importing user from LDAP and I would like to create home folders with instead the name of the user the organization  that he has on LDAP.
So far I modify the ldap-authentication.properties with my provider
   
     
 ldap.synchronization.defaultHomeFolderProvider=organizationHomeFolderProvider 


then I add the bean provider on ldap-authentication-contex


         <bean name="organizationHomeFolderProvider" class="org.alfresco.repo.security.person.UIDBasedHomeFolderProvider">
        <property name="serviceRegistry">
           <ref bean="ServiceRegistry" />
        </property>
        <property name="path">
          <value>/${spaces.company_home.childname}/HERE I WANT ADD THE ORGANIZATION FOR EVERY USER</value>
        </property>
        <property name="storeUrl">
           <value>${spaces.store}</value>
        </property>
        <property name="onCreatePermissionsManager">
            <ref bean="defaultOnCreatePermissionsManager" />
        </property>
        <property name="onReferencePermissionsManager">
            <ref bean="defaultOnReferencePermissionsManager" />
        </property>
        <property name="homeFolderManager">
           <ref bean="homeFolderManager" />
        </property>
    </bean>



So basically I want create a home folder with the structure /Company home/Organization of the user.  But I´m completely  lost, no documentation at all about how to achieve this.

Please any help would be great!
1 REPLY 1

ajmas
Champ in-the-making
Champ in-the-making
There are other home folder providers that you may be able to look at.

Documentation here: https://wiki.alfresco.com/wiki/Security_and_Authentication#Home_Folder_Provider_Properties
Source reference here: https://github.com/Alfresco/community-edition/blob/V4.2a/root/projects/repository/source/java/org/al...
Bean declarations: https://github.com/Alfresco/community-edition/blob/V4.2a/root/projects/repository/config/alfresco/au...

Where possible, try seeing if a configuration to an existing implementation will work. Worst case, you could code a custom solution.

The RegexHomeFolderProvider could be a good starting point?