如何访问 Anonymous 的 review_history
我在使用 getInfoFor
方法访问 review_history 时遇到问题,示例代码如下:
<div tal:define = "review_history python:wtool.getInfoFor(here, 'review_history', []);
review_history python: portal.reverseList(review_history)"
tal:repeat="items review_history">
<span tal:content="python: review_history" />
</div>
当我登录系统时,我可以看到 review_history var 的内容,但是当我以未注册的身份查看时用户,我看到的只是一个空列表。有没有人遇到过这个问题,有没有办法修改它,以便每个人都可以使用?
I'm having trouble accessing the review_history using the getInfoFor
method, example code below :
<div tal:define = "review_history python:wtool.getInfoFor(here, 'review_history', []);
review_history python: portal.reverseList(review_history)"
tal:repeat="items review_history">
<span tal:content="python: review_history" />
</div>
When I'm logged in to the system I can see the contents of the review_history var, but when I view as an unregistered user, all I see is an empty list. Has anyone ever come across this and is there a way to amend it so that its available to everybody?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您想要做的是调整工作流程,或者更好的是创建自定义工作流程。在此工作流程中,您可以管理内容的权限,并添加允许匿名用户查看对象的历史记录。 (不要忘记将新工作流程应用到您希望匿名用户可以使用其历史记录的内容类型。)
请查看 在 Plone 中创建工作流程 或 了解 plone.org 上的权限和安全性。这些页面应该能让您朝着正确的方向前进。
What you'd want to do is either adjust a workflow or, even better, create a custom workflow. In this workflow you can manage the permissions on your content and add that anonymous users are allowed to view the history of objects. (Don't forget to apply your new workflow to the content types of which you want to make the history available for anonymous users.)
Take a look at Creating Workflows in Plone or Understanding permissions and security on plone.org. Those pages should get you going in the right direction.