[Zope3-Users] ForbiddenAttribute "add" error

baiju m baiju.m.mail at gmail.com
Fri Mar 3 23:47:17 EST 2006


On 3/4/06, Joseph Method <tristil at gmail.com> wrote:
> Hi, I get this error
>
> ForbiddenAttribute: ('add', <zope.app.publisher.browser.viewmeta.+
> object at 0x754d09ac>)
>
> when I try to add a "Claim" to a "DebtManager" (both are subclasses of
> Folder) at http://localhost:8031/DebtManager/+/@@AddClaim.html
>
> The addform looks like this:
>
> <browser:addform
>       schema="debtman.interfaces.IClaim"
>       content_factory="debtman.debt.Claim"
>       label="Add Claim"
>       name="AddClaim.html"
>       fields="title description debtor creditor amount"
>       permission="zope.ManageContent"
>       />

You will required to give permission for 'IClaim' inteface.

Something like::

  <content class="debtman.debt.Claim">
    <implements
        interface="zope.app.annotation.interfaces.IAttributeAnnotatable"
        />
    <factory
        id="debtman.debt.Claim"
        description="A Claim."
        />
    <require
        permission="zope.ManageContent"
        interface="debtman.interfaces.IClaim"/>
    <require
        permission="zope.ManageContent"
        set_schema="debtman.interfaces.IClaim"
        />
  </content>

If you implemented a container interface (say, IClaimContainer)
along with IClaim in debtman.debt.Claim, then you have add::

    <require
        permission="zope.ManageContent"
        interface="debtman.interfaces.IClaimContainer"/>

Regards,
Baiju M


More information about the Zope3-users mailing list