简体   繁体   English

Plone:附加软件包的访问权限

[英]Plone: access permission on a add-on package

I'm new on Plone and I'm developing a small add-on package. 我是Plone的新手,我正在开发一个小的附加软件包。

How can I define a permission so that only logged users can access to the pages of the package? 如何定义权限,以便只有已记录的用户才能访问包的页面?

The actual permission is the following: 实际许可如下:

<browser:page
 name="homepage"
 for="*"
 permissions="zope.View"
 class=".homepage.HomepageView"
 />

With the standard permissions="zope.View" the page is accessible from everyone. 使用标准权限=“zope.View”,可以从每个人访问该页面。

You can either create your own permission or use an existing permission that is only granted to registered users by default, eg the "cmf.SetOwnPassword" permission: 您可以创建自己的权限,也可以使用默认情况下仅授予注册用户的现有权限,例如“cmf.SetOwnPassword”权限:

<browser:page
  name="homepage"
  for="*"
  permission="cmf.SetOwnPassword"
  class=".homepage.HomepageView"
/>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM