cancel
Showing results for 
Search instead for 
Did you mean: 

Creation of user home folders in 1.4

simon
Champ in-the-making
Champ in-the-making
Alfresco,

How can I prevent the creation of a folder for every user that is created by the people and group import job? I suppose this should go somewhere in the ldap-authentication-context.xml extended file?

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

I thought this did the trick in 1.3.2 but I can be mistaken. This setting creates the folders in the Company Home, not what I want.
7 REPLIES 7

jgreen
Champ in-the-making
Champ in-the-making
I'm in pretty much the same boat, I'm trying to get the users home generated into Company Home/Users so they can be managed up as a group.   If I figure it out I'll post here.

jgreen
Champ in-the-making
Champ in-the-making
I copied the config section that sets up user home folder provider and added /Users to the path property.

   <bean name="personalHomeFolderProvider" class="org.alfresco.repo.security.person.UIDBasedHomeFolderProvider">
      <property name="serviceRegistry">
         <ref bean="ServiceRegistry" />
      </property>
      <property name="path">
         <value>/${spaces.company_home.childname}/Users</value>
      </property>
      <property name="storeUrl">
         <value>${spaces.store}</value>
      </property>
      <property name="homeFolderManager">
         <ref bean="homeFolderManager" />
      </property>
      <property name="inheritsPermissionsOnCreate">
         <value>false</value>
      </property>
      <property name="ownerPemissionsToSetOnCreate">
         <set>
            <value>All</value>
         </set>
      </property>
      <property name="userPemissions">
         <set>
            <value>All</value>
         </set>
      </property>
   </bean>

This threw all kinds of exceptions since the folder didn't exist, I tried creating it manually but permissions were all wrong.

So I blew away the DB and content store and added the /Users directory into the bootstrap so it's created under System authority

Here's the added chunk of /alfresco/bootstrap/spaces.xml
(insert just before the last   </cm:contains> in the file)

            <cm:folder view:childName="Users">
               <view:acl view:inherit="false">
                  <view:ace view:access="ALLOWED">
                     <view:authority>GROUP_EVERYONE</view:authority>
                     <view:permission>Consumer</view:permission>
                  </view:ace>
                  <view:ace view:access="ALLOWED">
                     <view:authority>GROUP_EVERYONE</view:authority>
                     <view:permission>Consumer</view:permission>
                  </view:ace>
               </view:acl>
               <app:uifacets />
            <cm:name>Users</cm:name>
            <app:icon>space-icon-default</app:icon>
            <cm:title>User Home</cm:title>
            <cm:description>Root for users folders</cm:description>
         </cm:folder>

Login and synch jobs seem to be working fine this way.

andy
Champ on-the-rise
Champ on-the-rise
Hi

See http://wiki.alfresco.com/wiki/Security_and_Authentication#LDAP_Import

It should be possible to create a folder in which to create home folders for users via the UI and then invite users.

Regards

Andy

simon
Champ in-the-making
Champ in-the-making
Thanks both of you but it's not exactly what I need. I would like NOT to create any user folders. How can this be done?

simon
Champ in-the-making
Champ in-the-making
*bump*

andy
Champ on-the-rise
Champ on-the-rise
Hi


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

Should do the trick.

If you want to use another common space, create another provider. Make sure the folder exists first before using the provider. After 2.0, a folder "User Homes" will exist under "Company Home".

Regards

Andy

simon
Champ in-the-making
Champ in-the-making
I tried the personalHomeFolderProvider and that seemed to work as wel but this probably because I didn't define any personal home folder so Alfresco didn't know what to do with it. I'll give the companyHomeFolderProvider a shot. Thanks Andy!