ploneconfigurezopeuser-permissionszcml

Plone: access permission on a add-on package


I'm new on Plone and I'm developing a small add-on package.

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.


Solution

  • You can either create your own permission or use an existing permission that is only granted to registered users by default, e.g. the "cmf.SetOwnPassword" permission:

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