cancel
Showing results for 
Search instead for 
Did you mean: 

How to extend permissionDefinition in Alfresco Community 5.0.c

tiopourtu
Champ in-the-making
Champ in-the-making
Hello,

I am currently using Alfresco Community 5.0.c installed on Windows using installer.
I need to extend permissionDefinitions.xml using these codes:

  1. First I create a context file in <strong>tomcat/shared/classes/alfresco/extension</strong> named <strong>custom-model-context.xml</strong>


  2. <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

    <beans>

       <!– Bootstrap the permission model –>
        <bean id="extend_PermissionModel" parent="permissionModelBootstrap">
           <property name="model" value="alfresco/extension/permissionModelExtension.xml"/>
        </bean>

    </beans>

  3. I copy all content of <strong>permissionsDefinition.xml</strong> in file named <strong>permissionModelExtension.xml</strong> and put the file in <strong>tomcat/shared/classes/alfresco/extension</strong>

  4. Under <strong>cm:cmobject</strong> I add new role name Reader in <strong>permissionModelExtension.xml</strong> copying from Consumer

  5.    <!– The Reader permission allows read to everything by default.                  –>
        <permissionGroup name="Reader" allowFullControl="false" expose="true" >
            <includePermissionGroup permissionGroup="Read" type="sys:base" />
        </permissionGroup>
     
  6. Under <strong>cm:content</strong> I add:

  7.    <!– Added by STS –>
       <permissionGroup name="Reader" extends="true" expose="true"/>

  8. Under <strong>cm:folder</strong> I add:

  9.    <!– Added by STS –>
       <permissionGroup name="Reader" extends="true" expose="true"/>
From this point on, everything works fine. The new roles named <strong>roles.reader</strong> is shown in Share UI. I read the forum that I should change the *_en.properties that located under WEB-INF. I've ever tried before and it works.

The questions is, can I extends those properties in tomcat/shared/classes ? Could anyone share me how to do it, because touching everything under WEB-INF if the last thing I wanna do.

Thanks for the enlightenment!
1 REPLY 1

tybion
Champ in-the-making
Champ in-the-making
Sorry, I can't help you, but thanks for posting your work.  It has been very helpful in getting me started with permissions.