[Zope3-Users] ForbiddenAttribute "add" error

baiju m baiju.m.mail at gmail.com
Sat Mar 4 00:32:06 EST 2006


On 3/4/06, Joseph Method <tristil at gmail.com> wrote:
> What kind of thing would go into an IContainerInterface?

is  .interfaces.IDebtManager a IContainer interface, i.e.,
you are extending IContainer, like ::

  class IDebtManager(IContainer):
       pass

And you will be implementing IDebtManager using BTreeContainer
(An implementation of IContainer). i.e,

  class DebtManager(BTreeContainer):
       pass

> Just to be sure, I added the <factory> directives, although they
> seemed to be implied by the content directives, or I guess handled by
> addMenuItem. No dice.

Yes, factory sub-directive is not madatory.

> Fyi, here's the configure.zcml.
>
>
> <content class=".debt.DebtManager">
>         <factory
>
>                 id="debtman.debt.DebtManager"
>                 description="A debt manager"
>         />
>
>         <require
>                 permission="zope.ManageContent"
>                 interface=".interfaces.IDebtManager" />
>         <require
>                 permission="zope.ManageContent"
>                 interface=".interfaces.IDebtManagerSchema" />
>
>         <require
>                 permission="zope.ManageContent"
>                 set_schema=".interfaces.IDebtManagerSchema"
>                 />
>         <require
>                 permission="zope.ManageContent"
>                 attributes="add"
>                 />
>         <require like_class="zope.app.folder.Folder" />
>   </content>
>
> <content class=".debt.Claim">
>         <factory
>         id="debtman.debt.Claim"
>         description="A Claim"
>         />
>         <require
>                 permission="zope.ManageContent"
>                 interface=".interfaces.IClaim" />
>         <require
>                 permission="zope.ManageContent"
>                 set_schema=".interfaces.IClaim"/>
>         <require like_class="zope.app.folder.Folder" />
>
> </content>
>

And this looks ok.

Always reply to zope3-users list so that others can also help/learn.

Regards,
Baiju M


More information about the Zope3-users mailing list