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
Peter Bengtsson writes:
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. There is an easier method (though I currently do not know the details).
Have a look at CMFCore.UniqueObject. It blocks ids to be used a second time in the subtree. Dieter
participants (2)
-
Dieter Maurer -
Peter Bengtsson