[Zope-dev] RedstrictedCreation proposal

2002-04-09 Thread Toby Dickenson

Re: http://dev.zope.org/Wikis/DevSite/Proposals/RestrictedCreation

This proposal from Itamar has been up on dev.zope.org for a while, proposing 
a way for a registered type to control whether or not it can be added to a 
container, or a per-container basis.

I now have an implementation of this in CVS in the toby-metatypes-branch. I 
propose this goes into zope 2.6. Any comments?

(Ive CCed everyone who has commented on the proposal; I hope thats OK)


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] RedstrictedCreation proposal

2002-04-09 Thread Casey Duncan

IMO, this comes at this at the wrong direction.

Objects should not decide whether they can be added to a given folder, 
the folder should be the one that makes that decision.

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

This also invokes my ui chaos alarm. It gives things such arbitrary 
ability to dynamically affect the ui, that it may cause mass confusion 
by users who can't understand why an object is addable in one folder but 
not in another (seemingly identical) folder. Granted, this is somewhat 
possible right now (using permissions), but this pushes it a bit over 
the edge for me. It smells too much like magic.

-Casey

Toby Dickenson wrote:
 Re: http://dev.zope.org/Wikis/DevSite/Proposals/RestrictedCreation
 
 This proposal from Itamar has been up on dev.zope.org for a while, proposing 
 a way for a registered type to control whether or not it can be added to a 
 container, or a per-container basis.
 
 I now have an implementation of this in CVS in the toby-metatypes-branch. I 
 propose this goes into zope 2.6. Any comments?
 
 (Ive CCed everyone who has commented on the proposal; I hope thats OK)





___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



RE: [Zope-dev] RedstrictedCreation proposal

2002-04-09 Thread Brian Lloyd

 IMO, this comes at this at the wrong direction.
 
 Objects should not decide whether they can be added to a given folder, 
 the folder should be the one that makes that decision.
 
 It gives me the heebie geebies to think that every time the add list is 
 rendered, a whole slew of class methods are potentially called to 
 determine what gets put there.

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

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



Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering   540.361.1716   
Zope Corporation   http://www.zope.com



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] RedstrictedCreation proposal

2002-04-09 Thread Itamar Shtull-Trauring

Toby Dickenson wrote:

 (Ive CCed everyone who has commented on the proposal; I hope thats OK)

Could everyone stick to zope-dev only? One copy of each email is enough ;)



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] RedstrictedCreation proposal

2002-04-09 Thread Chris Withers

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

...but hasn't this problem already been solved with the wierd-interface-filter
thing that Andreas did for the PluginIndexes stuff?

cheers,

Chris


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] RedstrictedCreation proposal

2002-04-09 Thread Toby Dickenson

On Tue, 9 Apr 2002 10:57:04 -0400, Brian Lloyd [EMAIL PROTECTED]
wrote:

 IMO, this comes at this at the wrong direction.
 
 Objects should not decide whether they can be added to a given folder, 
 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 
 rendered, a whole slew of class methods are potentially called to 
 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 
actually implemented the suggestion that Jim made on 
the comments page of the proposal (add a filter to the 
meta type info, allowing products to do this without 
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 
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=registerClass



Toby Dickenson
[EMAIL PROTECTED]


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )