使Plone提供正确的403禁止错误 [英] Make Plone give proper 403 Forbidden errors

查看:133
本文介绍了使Plone提供正确的403禁止错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

默认的克隆行为是在用户尝试访问他或她没有权限的内容时显示登录框.

Default Plone behavior is to display login box when the user tries to access content for which he or she does not have permission.

如何更改此行为,以便显示未授权"页面?如何自定义此未经授权的页面以具有自定义文本.等等?

How to change this behavior so that instead and Unauthorized page is displayed? How to customize this unauthorized page to have custom texts. etc?

推荐答案

自定义此模板: Products.CMFPlone/Products/CMFPlone/skins/plone_login/require_login.py ,可以通过旧样式"皮肤定制或新样式" jbot定制: http://pypi.python.org/pypi/z3c .jbot (请参见CMF Objects部分)

Customize this template: Products.CMFPlone/Products/CMFPlone/skins/plone_login/require_login.py, either via "old style" skin customization or "new style" jbot customization: http://pypi.python.org/pypi/z3c.jbot (see CMF Objects section)

这篇关于使Plone提供正确的403禁止错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆