AnsweredAssumed Answered

Restricting create content menu for a custom type, based on a custom role

Question asked by reynanuy on Jun 29, 2018
Latest reply on Jul 11, 2018 by reynanuy

HI. I am having problems restricting the create content menu items, based on the Permissions of a folder. I am using the following custom role definition:

 

<permissionSet type="cm:cmobject" expose="selected">

   <permissionGroup name="GestorDocumental" allowFullControl="false" expose="true">
      <includePermissionGroup permissionGroup="Editor" type="cm:cmobject" />
      <includePermissionGroup permissionGroup="Contributor" type="cm:cmobject" />
      <includePermissionGroup permissionGroup="Delete" type="sys:base" />
   </permissionGroup>
   <permissionGroup name="CIDGestorArchivo" allowFullControl="false" expose="true">
      <includePermissionGroup permissionGroup="GestorDocumental" type="cm:folder" />
   </permissionGroup>
</permissionSet>

 

<permissionSet type="cm:folder" expose="selected">

   <permissionGroup name="CIDGestorArchivo" extends="true" expose="true"/>
</permissionSet>

 

And the relevant share form config is:

 

<create-content>
   <content id="fotoAGADU" label="CIDDAE --> Foto de AGADU" type="pagelink" icon="img" index="230" >
      <param name="page">create-content?destination={nodeRef}&amp;itemId=im:cid_fotoAGADU&amp;mimeType=text/html</param>
      <permissions>
         <permission allow="true">CIDGestorArchivo</permission>
      </permissions>
   </content>
</create-content>

 

I have two problems with this config running an Alfresco Community 5.1 with Tomcat 9:

  1. The Label for the new role is not loaded from /conf/alfresco/messages/common.properties. The only solution I have found is to modify the war and change the file there, but that should not be done obviously.
  2. Although the custom role is created and I can assign it without problems to a folder, the user with the given permission still can't create content of the custom type, the option is removed from the menu and never shown.

 

Any help with any of this, would be greatly appreciated folks.

Outcomes