AnsweredAssumed Answered

Problem with a custom role

Question asked by andreas.balis on Oct 21, 2017

Hello.
I encounter a problem with a custom role I have created. Although the role is working as expected and permissions are granted correctly, I have a problem when I review the roles assigned to the members of a site. If a add user members to a site and the custom role is assigned to a user, everything works fine. Also, if I add a group as member of a site and assign this custom role to the group, everything works fine too. But, if I add a group as a member of a site and assign an out-of-the-box role (e.g. Consumer) to the group and then assign the custom role (Content Manager) to one of the group's members, although the permissions granted are working as expected, when I review the roles assigned to each user member, the role of the user to which I assigned the custom role is not displayed correctly. The role that is displayed is the role assigned to his group (Consumer) and not the role that is assigned to this user (Content Manager). This happens only if I assign to user the custom role that I have created. If I assign to the user another out-of-the-box role, the correct role is displayed.

 

In order to create the custom role I have followed the steps below:

1) I have created a copy of files C:\alfresco-community\tomcat\webapps\alfresco\WEB-INF\lib\alfresco-repository-5.1.g.jar\alfresco\model\permissionDefinitions.xml and C:\alfresco-community\tomcat\webapps\alfresco\WEB-INF\lib\alfresco-repository-5.1.g.jar\alfresco\model\sitePermissionDefinitions.xml into C:\alfresco-community\tomcat\shared\classes\alfresco\extension (using the names extendPermissionDefinitions.xml and extendSitePermissionDefinitions.xml) and extend them by adding new roles

2) I have updated C:\alfresco-community\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\modules\documentlibrary\permissions.get.properties (This file controls what text is shown for the Document Library Module Permissions functions)

3) I have updated C:\alfresco-community\tomcat\shared\lib\share-el.jar\alfresco\site-webscripts\org\alfresco\modules\documentlibrary\permissions.get_el.properties (This file controls what text is shown for the Document Library Module Permissions functions)

4) I have updated C:\alfresco-community\tomcat\webapps\share\WEB-INF\classes\alfresco\messages\slingshot.properties (to give nice name in invite users)

5) I have updated C:\alfresco-community\tomcat\shared\lib\share-el.jar\alfresco\messages\slingshot_el.properties (to give nice name in invite users)

6) I have updated C:\alfresco-community\tomcat\shared\lib\alfresco-el.jar\alfresco\messages\slingshot_el.properties (to give nice name in invite users)

7) I have updated C:\alfresco-community\tomcat\webapps\share\WEB-INF\classes\alfresco\messages\common.properties (to give nice name in document library edit properties)

8) I have updated C:\alfresco-community\tomcat\shared\lib\share-el.jar\alfresco\messages\common_el.properties (to give nice name in document library edit properties)

I

have also tested it by following another approach on step 1. I edited C:\alfresco-community\tomcat\webapps\alfresco\WEB-INF\lib\alfresco-repository-5.1.g.jar\alfresco\model\permissionDefinitions.xml and C:\alfresco-community\tomcat\webapps\alfresco\WEB-INF\lib\alfresco-repository-5.1.g.jar\alfresco\model\sitePermissionDefinitions.xml and saved the changes back into the .jar files.

 

Below is the version that I have installed.

Alfresco Community (Build: 201605)
===============================

Contains:
- Alfresco Platform: 5.1.g
- Alfresco Share: 5.1.f

 

I would really appreciate any help on this issue.
Thank you in advance.

 

Andreas

Outcomes