Change Zope2 browser resourceDirectory permission to allow only Authenticated users

48 Views Asked by At

I have a browser:resourceDirectory setup in Zope2 and I have: permission="zope2.Public".

what should be changed in order to allow only "Authenticated" users access to the resource directory?

1

There are 1 best solutions below

0
On BEST ANSWER

Solved this by creating a new permission my_permission and mapped the permission to Authenticated role. Then adding the permission to resourceDirectory like permission="my_permission"

Permission:

<permission
      id="my_permission"
      title="my_permission"
      description="My Permission">
    <role name="Authenticated"/>
</permission>

resourceDirectory:

 <browser:MyDirectory
    name="static_contents"
    directory="myfolder"
    permission="my_permission"
    />