我有一个灵巧的内容类型,有自己的工作流程,我试图获取历史记录的链接,以显示在标题,作者,创建/修改日期。
在我的内容类型模板中,我有:
<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>
奇怪的是,如果我通过手动输入网址进入历史记录页面,则会显示历史记录,显示创建,修改和工作流程更改。有权访问历史记录的角色分配了审核门户网站内容(可以批准/拒绝的角色)和请求审核(可以提交以供审核的角色),但链接本身不会显示。
是否需要单独的许可?
编辑:我看了一下plone.app.layout.viewlets.content,我在HistoryByLineView中看到一个名为show_history的函数,它检查用户是否有权限&#39; CMFEditions:Access previous版本&#39;并且如果他们没有,则返回False。在history_view模板中,似乎调用是否显示历史视图的链接。这是我真正需要的许可吗?
编辑:我的Plone版本是4.3.11。
答案 0 :(得分:4)
我看了一下plone.app.layout.viewlets.content,我在HistoryByLineView中看到一个名为show_history的函数,它检查用户是否拥有'CMFEditions:Access previous versions'的权限并返回False如果他们不这样做。在history_view模板中,似乎调用是否显示历史视图的链接。这是我真正需要的许可吗?
我认为你是对的。在CMFEditions中,that permission is assigned to Manager and Site Administrator only
AccessPreviousVersions = 'CMFEditions: Access previous versions'
setDefaultRoles(AccessPreviousVersions, ('Manager', 'Site Administrator'))
您可以尝试将其分配给Reviewer
中的其他角色(例如Member
或/manage_access
)。