使用Diazo主题时,静态资源当前需要授权才能显示它们。以下是静态主题的注册方式:
<plone:static directory="static" type="theme" name="projecttheme" />
如果您从这些资源中剥离cookie(在这种情况下通过清漆),则每个静态资源的日志中都会出现以下错误:
2013-08-29 18:50:35 DEBUG ImplPython Unauthorized: Your user account does not have
the required permission. Access to 'project.css' of (FilesystemResourceDirectory
object at /data/project/eggs/project.theme-1.29-py2.7.egg/project/theme/static/styles)
denied. Your user account, Anonymous User, exists at /acl_users. Access requires
Access_contents_information_Permission, granted to the following roles:
['Contributor', 'Editor', 'Manager', 'Owner', 'Reader', 'Site Administrator']. Your
roles in this context are ['Anonymous'].
因此,如果没有cookie,则没有auth,那么由于Access contents information
权限,您将获得权限被拒绝。有没有办法在没有这个限制的情况下提供静态Diazo资源?