[Zope] Controlling visibility of dtml methods/documents -- a newbie question

Paul Everitt paul@digicool.com
Sat, 20 Feb 1999 07:47:54 -0500


Butch Landingin wrote:
> But what I really want to do is to control visibility of an object --
> something like a property I can switch on or off for each object so
> that when I try to access it directly (i.e.
> "http://mysite.com/folder/dtmlmethod" ) will display an error message
> saying that it doesn't exist -- but I can still access it by including
> it in my dtml code (e.g. "<!--#var dtmlmethod -->") and I'd also want
> it turned on for some dtml methods (e.g. for the index_html dtml
> method). Is there some Zope facility for doing this?

Boy this is an unusual one.  Though I can't really think of a reason
*why* you'd want this, I presume it's a good reason.

I'm kind of against providing a general facility for this for the
following reason.  We've tried to make the security rules for accessing
objects consistent from within DTML and from the web.

My tip on how you could hack your own version would be to hack Folders
to step into the publishing process.  I believe you'd write a
__bobo_before__ function that looked to see if the object being
requested was marked as unpublishable.  Unfortunately I'm not much of a
programmer, as most here know, so this might all be Typical Paul
Hogwash(tm).

--Paul