userisnew
userisnew

Reputation: 11

Change Zope2 browser resourceDirectory permission to allow only Authenticated users

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?

Upvotes: 1

Views: 44

Answers (1)

userisnew
userisnew

Reputation: 11

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"
    />

Upvotes: 0

Related Questions