cancel
Showing results for 
Search instead for 
Did you mean: 

Groups created via bootstrap

limarin
Champ in-the-making
Champ in-the-making
I have created spaces and users via bootstrap (Like in the example sampleUsers, spaces.xml and software_engineering_project.xml)

But, how do groups create via bootstrap?

I'm just looking at the bootstrap process and I was wondering how to create groups at this stage. In fact I can't figure out what is the node type for groups. I guess the groups should be defined in the alfrescoAuthorityStore.xml in
<sys:container view:childName="${alfresco_user_store.authorities_container.childname}"> 
    </sys:container>

I've looked in the userModel.xml
   <type name="usr:authorityContainer">
         <title>Alfresco Authority Type</title>
         <parent>usr:authority</parent>
         <properties>
            <property name="usr:authorityName">
               <type>d:text</type>
            </property>
            <property name="usr:members">
               <type>d:text</type>
               <multiple>true</multiple>  
            </property>
         </properties>
         <associations>
            <child-association name="usr:member">
               <source>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </source>
               <target>
                  <class>usr:authority</class>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </target>
               <duplicate>false</duplicate>
            </child-association>
         </associations>
      </type> 
Could you confirm this and tell me what is the node type for the groups ? And can you show me an example?

Thanks for your help
1 REPLY 1

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

Basically you are correct.

The groups are of type usr:authorityContainer.

To link you want
* AssocType = ContentModel.ASSOC_MEMBER,  QNAME = usr:childname

To create top level you want
* AssocType = ContentModel.ASSOC_CHILDREN,  QNAME = usr:childname, Type = ContentModel.TYPE_AUTHORITY_CONTAINER

To create sub group:
* AssocType = ContentModel.ASSOC_MEMBER,  QNAME = usr:childname, Type = ContentModel.TYPE_AUTHORITY_CONTAINER

The import would follow a similar pattern to users in the file.

Regards

Andy