AnsweredAssumed Answered

create a user while installing an amp

Question asked by ethan on Oct 5, 2010
Latest reply on Oct 11, 2010 by ethan
Hi :)

I'm trying to convert a project into an amp package. I read the wiki page Developing an Alfresco Module and I saw that it's possible to import or create groups and users when the amp is installed on Alfresco. The wiki page provides a sample code which create a new group but there is no sample for user creation.
I don't know how to change the code to adapt it to a user creation.

The code provided for the xml file is the following :


<?xml version="1.0" encoding="UTF-8"?>
  <view:view xmlns:view="http://www.alfresco.org/view/repository/1.0"
          xmlns:cm="http://www.alfresco.org/model/content/1.0"
          xmlns:sys="http://www.alfresco.org/model/system/1.0"
          xmlns:usr="http://www.alfresco.org/model/user/1.0"
          xmlns:app="http://www.alfresco.org/model/application/1.0">
    
     <usr:authorityContainer view:childName="usr:GROUP_MyGroup">
       <view:aspects>
         <sys:referenceable></sys:referenceable>
       </view:aspects>
       <view:properties>
         <sys:store-protocol>user</sys:store-protocol>
         <cm:name>GROUP_MyGroup</cm:name>
         <sys:node-uuid>GROUP_MyGroup</sys:node-uuid>
         <usr:authorityName>GROUP_MyGroup</usr:authorityName>
         <sys:store-identifier>alfrescoUserStore</sys:store-identifier>
       </view:properties>
       <view:associations></view:associations>
     </usr:authorityContainer>
  </view:view>

Do I need to just replace each GROUP instance by USER ? Is there any user specific options which must be added to this code?

Thank you :)
Regards.

Outcomes