Stacy Roberts Ladnier writes:
> I have created a Product made up of hundreds of classes. Each class has
> restrictions that should only allow a certain few meta_types to be
> added.
Give your classes an "all_meta_types" method, similar to the
following:
def all_meta_types(self):
return (
{
'name' : PortalConfig.meta_type,
'action': 'PortalConfig_add',
'permission': ManagePortal,
},
)
I.e. "all_meta_types" should return a sequence of dictionaries.
Each dictionary describes an allowed meta type, "name" gives its
name (meta_type), "action" the URL to the constructor,
"permission", the permission necessary to be allowed to add
this meta type.
Dieter
_______________________________________________
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 )