[Zope3-Users] ForbiddenAttribute error
Dennis Noordsij
dennis.noordsij at movial.fi
Fri Jul 6 10:50:00 EDT 2007
> <require
> permission="zope.ManageContent"
> set_schema=".interfaces.IFeed"
> />
> </class>
>
>
> Haven't I declared the getRawFeedData method by including it in the IFeed
> interface?
>
> Thanks!
>
> /Mikael M
Hi Mikael
Rest assured you have a permissions problem. (ForbiddenError)
For one thing, set_schema means that to set any attributes in that schema, you
need this permission. But your method getRawFeedData is not a settable
attribute, but a method.
Notice that when you assign write permissions to a container (for example),
you say
interface="zope.app.container.interfaces.IWriteContainer", and not
set_schema="..."
You need set_schema (or set_attributes) for the list attribute, but you need
interface (or attributes) for your getRawFeedData method, since you just want
to call it.
Add
<require
permission="zope.ManageContent"
attributes="getRawFeedData"
/>
and it should work. Might not be the "best" way though but I am sure more
knowledgable people will step in :)
Hope it gets you closer
Dennis
More information about the Zope3-users
mailing list