Zope page templates and access controls
Hello, I have a brief question about Zope page templates and access controls. My page template was written for Plone (it is a portlet macro), but I believe my question applies to Zope in general. What is the best forum to ask these kinds of software development questions? Should I post to a Plone developers' mailing list first? In case this is the appropriate place to ask, my page template lists the contents of a folder and prints out links to those items: <h5 tal:content="here/title_or_id">Folder Name</h5> <div tal:repeat="item here/objectValues" tal:omit-tag=""> <div class="portletContent even" tal:condition="repeat/item/odd"> <a href="#odd" tal:attributes="href item/absolute_url" tal:content="item/title_or_id">Odd item title</a> </div> <div class="portletContent odd" tal:condition="repeat/item/even"> <a href="#even" tal:attributes="href item/absolute_url" tal:content="item/title_or_id">Even item title</a> </div> </div> <!-- tal:repeat --> To call this template, one simply adds the name of this page template to the end of the URI, e.g. portal/path/portlet_folder_contents in the Plone site's left or right slots, or http://web.irtnog.org/legal/portlet_folder_contents in the browser. I don't want this page template to display anything if the user does not have rights to read the underlying folder or its contents, e.g. I use this list the contents of a folder to which only authenticated users should have access. Do I simply change the view permissions on the folder and contents themselves (that would be ideal) or on the Zope page template itself, or must I encode some permissions check in the body of the page template? Pointers to the relevant documentation would be greatly appreciated. I am in the midst of reading through the 2.7 edition of the Zope Book. Best wishes, Matthew -- "The challenge of a moral life is to do nothing that requires forgiveness." - Roger Ebert in his review of _The Woodsman_
participants (1)
-
Matthew X. Economou