[Zope3-Users] ForbiddenAttribute error when adding a container

baiju m baiju.m.mail at gmail.com
Fri Sep 16 00:56:06 EDT 2005


On 9/14/05, Maciej Pietrzak <mpietrzak at hell.org.pl> wrote:
> 
> My guess is that you forgot to specify permissions for container interface.
> 
> Add <require permission="zope.View"
> interface="zope.app.container.interfaces.IReadContainer"/> (or
> something like that) to your ZCML file (inside <condent/> element).
> 

Thank you, that was the problem,
Actually I should have added (In my case):

    <require
        permission="zope.ManageContent"
        interface=".interfaces.ICommentContainer"/>
    <require
        permission="zope.ManageContent"
        interface=".interfaces.IComment"/>

i.e., if a container object can contain itself, I have to given permission for
both interfaces (IMyInterfce and IMyInterfceContainer)

With thanks,
Baiju M


More information about the Zope3-users mailing list