[Zope-dev] RedstrictedCreation proposal

Toby Dickenson tdickenson@geminidataloggers.com
Tue, 09 Apr 2002 16:18:38 +0100


On Tue, 9 Apr 2002 10:57:04 -0400, "Brian Lloyd" <brian@zope.com>
wrote:

>> IMO, this comes at this at the wrong direction.
>>=20
>> Objects should not decide whether they can be added to a given folder,=
=20
>> the folder should be the one that makes that decision.

Zope can already do that. Check out how ZCatalog.Indexes requires all
of its contained items to implement the PluggableIndex interface.

That works well when you have a special folder type, but it doesnt
help when you want to control whether special objects can be added to
ordinary folders.

>> It gives me the heebie geebies to think that every time the add list =
is=20
>> rendered, a whole slew of class methods are potentially called to=20
>> determine what gets put there.

One function per type, if it was specified during registration. This
isnt configurable through-the-web.

>I think (correct me though, if I'm wrong!) that Toby=20
>actually implemented the suggestion that Jim made on=20
>the comments page of the proposal (add a filter to the=20
>meta type info, allowing products to do this without=20
>killing performance).

Thats correct. I changed the parameter name from Jim's suggestion;
'filter' to 'container_filter'.

>We need to find a reasonable place to document the API=20
>addition for this before merging it.

Im happy to keep any documentation up to date, provided it is already
up to date. Is there any more than the docstring? Suprisingly, I
couldnt find any at
http://www.zope.org/SiteIndex/search?text_content=3DregisterClass



Toby Dickenson
tdickenson@geminidataloggers.com