cancel
Showing results for 
Search instead for 
Did you mean: 

[HOWTO] Custom Permissions in ALF Community 5.0.d

deajan
Champ on-the-rise
Champ on-the-rise
[EDIT]
I've managed to get stuff working for me !
Please see https://forums.alfresco.com/comment/156540#comment-156540 for a howto on custom Permissions
[/EDIT]

Hello,

I am trying to add a custom role to Alfresco based on Consumer role, with some modifications (basically i want a role that can comment but can't start a workflow).

I've followed the tutorial here: https://wiki.alfresco.com/wiki/Custom_Permissions_in_Share
I've double checked everything, but it seems that my modified file in <alfresco_root>/tomcat/shared/classes/alfresco/extension/sitePermissionDefinitions.xml never gets loaded.

My file contents:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE permissions >

<permissions>

    <!– Namespaces used in type references –>

   <namespaces>
      <namespace uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/>
      <namespace uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
      <namespace uri="http://www.alfresco.org/model/site/1.0" prefix="st"/>
   </namespaces>

   <!– ============================================ –>
   <!– Permissions specific to the wiki integration –>
   <!– ============================================ –>

   <permissionSet type="st:site" expose="selected">

      <permissionGroup name="SiteManager" allowFullControl="true" expose="true" />

      <permissionGroup name="SiteCollaborator" allowFullControl="false" expose="true">
         <includePermissionGroup permissionGroup="Collaborator" type="cm:cmobject" />
      </permissionGroup>

      <permissionGroup name="SiteContributor" allowFullControl="false" expose="true">
         <includePermissionGroup permissionGroup="Contributor" type="cm:cmobject" />
      </permissionGroup>

      <permissionGroup name="SiteConsumer" allowFullControl="false" expose="true">
         <includePermissionGroup permissionGroup="Consumer" type="cm:cmobject" />
         <includePermissionGroup permissionGroup="ReadPermissions" type="sys:base" />
      </permissionGroup>

      <permissionGroup name="SiteCommentator" allowFullControl="false" expose="true">
         <includePermissionGroup permissionGroup="Consumer" type="cm:cmobject" />
         <includePermissionGroup permissionGroup="ReadPermissions" type="sys:base" />
      </permissionGroup>

   </permissionSet>

</permissions>

Maybe my sitePermissionDefinitions.xml should go in another path ?

Any advices please ?

Regards,
Ozy.
16 REPLIES 16

huyenvtus
Champ in-the-making
Champ in-the-making
Hi, I am a newbie, so maybe step by step I do it wrong. Now my alfresco is fail, can't login. If you have video step by step is very good Smiley Sad

saif
Champ on-the-rise
Champ on-the-rise

hello,

I'm following your configuration but not for workflowPermission, is for create a new permission CanDownload but the role commentator is created with succes but the permission CanDownload is not visible in liste of action role administrator,

Can you help me for result this probleme,

thanks in advanced

Hello,

I have followed your instructions and fixed one of the existing site using the webscript. I am still receiving the following error while accessing the Site Members tab of the Site which is fixed. Please help!

imaneesse
Champ in-the-making
Champ in-the-making
Hi deajan

Thanks for this [HOWTO], it's very helpful but i have a little problem, that when i add workflowPermissions on "share-config-custom.xml" , no one can have tha right to approve something even the Administrator.

plzz can u help me if u have an idea how to fix it

thanks for advance

agg
Champ in-the-making
Champ in-the-making
Hi ImaneEsse!

I had the same problem! If you follow all the given instructions no one will have permissions.

I'm affraid that deajan missed one configuration in his helpful instructions:

You must put the file 'script-services-context.xml' in tomcat/shared/classes/alfresco/extension/script-services-context.xml

(In Alfresco 5.0.c this file must be inside a .jar… but you can find its content in https://github.com/Alfresco/community-edition/blob/master/projects/repository/config/alfresco/script...)

Once the file is placed in the mentioned directory you must edit it and find the tag:

<property name="userPermissions">


and put the new permission value (WorkFlowPermissions)



<bean id="baseJsonConversionComponent" abstract="true">
        <property name="nodeService" ref="NodeService"/>
        <property name="publicServiceAccessService" ref="PublicServiceAccessService" />
        <property name="namespaceService" ref="NamespaceService" />
        <property name="fileFolderService" ref="FileFolderService" />
        <property name="lockService" ref="LockService" />
        <property name="permissionService" ref="PermissionService" />  
        <property name="contentService" ref="ContentService" />
        <property name="userPermissions">
            <list>
                <value>Unlock</value>
                <value>CancelCheckOut</value>
                <value>ChangePermissions</value>
                <value>CreateChildren</value>
                <value>Delete</value>
                <value>Write</value>
           <value>WorkFlowPermissions</value>
            </list>
        </property>
    </bean>




After doing that and the other instrucctions given by deajan… you will see that it works!

huyenvtus
Champ in-the-making
Champ in-the-making
I do it again in 5.0.c but lost log in screen

townsend
Champ in-the-making
Champ in-the-making
I guess the problem in selinux, but I don't know how to set selinux to solve it. So, I just disable the selinux, and alfresco is running now. My environment: centos7x64 +  alfresco communicate 201604
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.