In article <37A412DF.19C384F7@digicool.com>, Michel Pelletier <michel@digicool.com> writes
Robin Becker wrote:
I have found acquisition useful in several cases, but I would like to eliminate it for certain folders
I have
/-index_html | |--DOCS/ | |--IMAGES/ | |--RUBBISH/
it's useful in DOCS/mydoc_html to refer to IMAGES/myimage.gif, but I really don't want RUBBISH/index_html to be available as /DOCS/RUBBISH
Do I have to go through a whole rigmarole of defining roles/users or is there some easy way to make RUBBISH non-acquirable? --
The index_html method in R could check the roles of the user, and raise NotFound if you weren't happy about user seeing RUBBISH/. Any combination of DTML check could be made before you did a <dtml-raise NotFound><dtml-zippy></dtml-raise>. The Zippy tag filling in for an inciteful error message in this case.
this is nice, but it doesn't really answer the question. If I said that I want /Status/index_html to be valid, but not /DOCS/Status/index_html this isn't a function of the user at all, but of the absolute URL so I guess I want to ensure that the document id corresponds to the absolute URL. But even though I can check and act on this it isn't the same as making the /Status folder to be non acquirable.
For example (and I actualy checked this, usualy I just make it up):
<dtml-var standard_html_header> <dtml-if "'Anonymous' in AUTHENTICATED_USER.getRoles()"> <dtml-raise NotFound> <h2>Your not supposed to be looking at <dtml-var "absolute_url()"> </h2> </dtml-raise> </dtml-if>
<h2><!--#var title_or_id--></h2> <p> This is the <!--#var id--> Document. </p> <dtml-var standard_html_footer>
-Michel
Robin Becker
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://www.zope.org/mailman/listinfo/zope-dev
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For non-developer, user-level issues, zope@zope.org, http://www.zope.org/mailman/listinfo/zope )
-- Robin Becker