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,
Garth

On 1/7/07, Dieter Maurer <dieter@handshake.de> wrote:

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

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 object
>does not have a defined all_meta_types function.  Everything shows up in the
>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 as
>one would expect.
>
>In the second scenario, I have a role "Editor" which controls what kinds of
>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 the
>user to add are shown.  When I define all_meta_types for my folderish object
>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 see
>when only able to add a single type of object to a folderish object.

--
Dieter