[Zope] File Object - Precondition?

Martijn Pieters mj@digicool.com
Thu, 9 Mar 2000 01:52:45 +0100


From: "Damian Morton" <morton@dennisinter.com>
> In Zope, file objects have a 'Precondition' attribute. What is this for?

It is the name of a method that will be called when the File is accessed.
You can use it for checking a session cookie, or anything you need from the
REQUEST.

If you then want to deny access to the resource, because your precondition
hasn't been met, the method can raise an exception.

Martijn Pieters
| Software Engineer    mailto:mj@digicool.com
| Digital Creations  http://www.digicool.com/
| Creators of Zope       http://www.zope.org/
|   The Open Source Web Application Server
---------------------------------------------