[Zope] Simple observer

Peter Bengtsson mail@peterbe.com
Fri, 15 Jun 2001 10:43:59 +0200


I'd like to add God to a folder. What I want is that for some reason (pseudo
reason) that you shouldn't be allowed to create objects with certain ids in
a specific folder.

Perhaps a little product or something that just sits there and sniffs for
manage_add* requests or something.
One basic solution would be to create my own copies or addFolder, addImage,
addSquishdot form and methods in which I have something like this:
if REQUEST['id'] =='protectedid':
   print "not that id, it's not meant to be used"
else:
   self.manage_addFolder(REQUEST['id'],REQUEST)

But to handcode a solution I have to create my own version of all meta
types, and I don't want that. I just want to put up an extra guard in front
of the setObject() doings.

What simple options are available for this?


Peter