[Solved] Sharing Tab Configuration of new Roles

<sharing
  xmlns:i18n="http://xml.zope.org/namespaces/i18n"
  i18n:domain="my.addon">
  <role
    id="Editor in chief"
    title="a Editor in chief"
    i18n:attributes="title"
    permission="Sharing page: Delegate roles"
    required_permission="Sharing page: Delegate roles" />
</sharing>

I found two attributes for the permission handling,

Question: Are they both the same or is there a difference or an incorrect use by me? Should I only use one of these two? If yes, which?

Update

with the hint of @jaroel :

<sharing
  xmlns:i18n="http://xml.zope.org/namespaces/i18n"
  i18n:domain="my.addon">
  <role
    id="Editor in chief"
    title="a Editor in chief"
    i18n:attributes="title"
    permission="Sharing page: Delegate roles" />
</sharing>

You should use permission in sharing.xml.

The value in the xml file is read here https://github.com/plone/plone.app.workflow/blob/979cf9a8046d1ef11d92958ef384f8e082014a81/plone/app/workflow/exportimport.py#L85 and the object for the sharing role is made here plone.app.workflow/exportimport.py at 979cf9a8046d1ef11d92958ef384f8e082014a81 · plone/plone.app.workflow · GitHub

Hope this helps!

1 Like