Hello Dieter,

This is my all_meta_types function:

def all_meta_types(self):
   return (
           'name' : 'Web Page',
           'action': 'manage_addProduct/DWT/WebPage_add',
           'permission': 'Add Web Page',

I haven't followed Maciej's suggestion yet to use pdb to more closely trace
what's going on, but if you have suggestions on what *might* be going on to
help me in my debugging, that would be great.

Thank you,

On 1/7/07, Dieter Maurer <[EMAIL PROTECTED]> wrote:

 You have included the "'permission'" definition in your "meta_type"

Garth B. wrote at 2007-1-5 23:06 -0500:

I'm trying to filter the objects that appear in the Add drop down, and I'm
>having odd results.  There are two scenarios.
>In the first scenario, the active user is a Manager and my folderish
>does not have a defined all_meta_types function.  Everything shows up in
>Add drop down as expected.  When I define all_meta_types for my folderish
>object to only return one kind of object, the "Add xxxxx" button appears
>one would expect.
>In the second scenario, I have a role "Editor" which controls what kinds
>objects the user can add.  When I do not have an all_meta_types function
>defined on my folderish object, only those objects that the role permits
>user to add are shown.  When I define all_meta_types for my folderish
>to only return one of the kinds of objects that the role does permit, the
>user can't add anything.  No "Add xxxxx" button that one would normally
>when only able to add a single type of object to a folderish object.


Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to