pythonplonedexterityplone-4.x

Plone - In the viewlet with the title/author info, why is the link to history hidden for users without Owner role?


I have a dexterity content type with its own workflow and I'm trying to get the link to history to show up in the viewlet that gives the title, the author, date created/modified.

In my content type's template, I have:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
  xmlns:tal="http://xml.zope.org/namespaces/tal"
  xmlns:metal="http://xml.zope.org/namespaces/metal"
  xmlns:i18n="http://xml.zope.org/namespaces/i18n"
  lang="en"
  metal:use-macro="context/main_template/macros/master"
  i18n:domain="my.product">

    <body>

        <metal:content-core fill-slot="content-core">
            <metal:content-core define-macro="content-core">

            ....

            </metal:content-core>
        </metal:content-core>        
    </body>

</html>

What's weird is that if I go to the history page itself through manually entering the url, the history shows up showing created, modified, and the workflow changes. The roles that have access to the history are assigned Review portal content (roles that can approve/reject) and Request review (roles that can submit for review), yet the link itself won't show up.

Is there a seperate permission needed?

Edit: I took a look at plone.app.layout.viewlets.content, which I see in the in the HistoryByLineView a function called show_history which checks to see if the user has a permission 'CMFEditions: Access previous versions' and returns False if they don't. In the history_view template, this seems to be called as to whether or not to display the link to the history view. Is this the permission I am really looking for?

Edit: My version of Plone is 4.3.11.


Solution

  • I took a look at plone.app.layout.viewlets.content, which I see in the in the HistoryByLineView a function called show_history which checks to see if the user has a permission 'CMFEditions: Access previous versions' and returns False if they don't. In the history_view template, this seems to be called as to whether or not to display the link to the history view. Is this the permission I am really looking for?

    I think you're right. In CMFEditions, that permission is assigned to Manager and Site Administrator only

    AccessPreviousVersions = 'CMFEditions: Access previous versions'
    setDefaultRoles(AccessPreviousVersions, ('Manager', 'Site Administrator'))
    

    You can try to assign it to another role (eg. Reviewer or Member) in /manage_access.