[Zope] set permission dependig from domain

Joel Burton joel@joelburton.com
Thu, 28 Feb 2002 18:35:16 -0500 (EST)


On Thu, 28 Feb 2002, Sidnei da Silva wrote:

> There is somethin called precommand on files. Maybe you should try it.
>
> > > if this doesn't work, something more programmatic, like a SetAccessRule
> > > python script in the folder in question would work. This would compare
> > > the requester's domain and could raise an exception. It's not nice, clean
> > > declaration security like above, but, hey, it would get the job done.
> >
> > Ok, I could write such a script, but how do I run the script when the
> > user acesses the contents of the folder? Lets say the user directly
> > calls http://mydomain/myfolder/myfile.pdf.

The whole point of an SetAccessRule is that it is *always* called
automatically on all objects in and below the folderish object in which it
is installed.

-- 

Joel BURTON  |  joel@joelburton.com  |  joelburton.com  |  aim: wjoelburton
Independent Knowledge Management Consultant