cancel
Showing results for 
Search instead for 
Did you mean: 

FIXED: User Home Space Template and userHomesHomeFolderProv

roli8200
Champ in-the-making
Champ in-the-making
Hello

We use Alfresco 2.1 Cummunity  and configured the LDAP Authentication against our own openldap-Server. Everything works fine sofar. But we should create the user homes based on a space template. I alreday researched something but couldn't find a proper solution yet.

Isn't it possible to define a property in the userHomesHomeFolderProvider bean configuration that this provider uses a space template to create the user home spaces? It would help a lot because now we have to create the spaces manually after creating the user accounts.

Many thanks

Roland Käser
6 REPLIES 6

zaizi
Champ in-the-making
Champ in-the-making
Use the UIDBasedHomeFolderProvider's template path property to specify your Space Template. More details http://wiki.alfresco.com/wiki/Security_and_Authentication#Creating_a_home_space_based_on_uid.

templatePath
    An optional path to a template node used to create home spaces.

roli8200
Champ in-the-making
Champ in-the-making
Many thanks. I will just try it.

Regards

Roland

roli8200
Champ in-the-making
Champ in-the-making
Hello

Sorry for again questioning eventually stupid question. But how can I find the correct Path to my template? We mainly using german language setting so its not fully clear to me which is the correct path to the Space-Tempate?

The template is located in: company_home/Arbeitsbereichs-Vorlagen (eventually Workspace-Tempate)/UserSpace-Template

Thanks

Roland

zaizi
Champ in-the-making
Champ in-the-making
Happy to help. The Alfresco code uses XPath search to find the node. Actually this function: http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/service/cmr/search/SearchService....(org.alfresco.service.cmr.repository.NodeRef,%20java.lang.String,%20org.alfresco.service.cmr.search.QueryParameterDefinition[],%20org.alfresco.service.namespace.NamespacePrefixResolver,%20boolean).

You can test the search yourself by using the Node browser under Administrative Console to work out the exact search query.

For the example you've given it should be something like;


/app:company_home/cm:Arbeitsbereichs-Vorlagen/cm:UserSpace-Template

Just search for "/app:company_home/cm:" to get a list of the sub folders to work your way down. This assumes you are using the default Alfresco content model.

roli8200
Champ in-the-making
Champ in-the-making
Great! But it seems that something is already wrong. So let me short describe what I have made:

- Edited the file tomcat/webapps/alfresco/WEB-INF/classes/alfresco/authentication-services-context.xml
Added content:
        <property name="templatePath">
              <value>/app:company_home/cm:Arbeitsbereichs-Vorlagen/cm:UserSpace-Template</value>
       </property>
       To the bean  <bean name="userHomesHomeFolderProvider" class="org.alfresco.repo.security.person.UIDBasedHomeFolderProvider">

       Changed the Bean <bean name="homeFolderManager" class="org.alfresco.repo.security.person.HomeFolderManager">
              Changed the property defaultProvider to <ref bean="userHomesHomeFolderProvider" />

Edited the file: tomcat/shared/classes/alfresco/extension/ldap-authentication-context.xml
       Changed the bean <bean id="ldapPeopleExportSource" class="org.alfresco.repo.security.authentication.ldap.LDAPPersonExportSource">
       Changed the Property "attributeDefaults" to the following Entry:

          <property name="attributeDefaults">
             <map>
                  <entry key="cm:homeFolderProvider">
                        <value>userHomesHomeFolderProvider</value>
                 </entry>
             </map>
         </property>


I thought that this should be enought. Do I have forgotten something to configure?

Thanks in advance

Roland

roli8200
Champ in-the-making
Champ in-the-making
Sorry for the question. The error was just a misspelled template path. I searched a bit in the node browser. The correct path is:

/app:company_home/app:dictionary/app:space_templates/cm:UserSpace-Tempate


Let me send You many thanks for all the help. As longer as I work with alfresco I get more and more enthusiastic about this really great product.

Regards

Roland Käser