Re: [Zope3-Users] ForbiddenAttribute error

2007-07-07 Thread Hermann Himmelbauer
Am Freitag, 6. Juli 2007 16:29 schrieb Mikael Moutakis:
 I wrote a feed aggregator using the module FeedParser. I stored the RSS
 feed url in a persistant content component and retrieved the feed data in
 the view class. But I thought that I should move the feed data into the
 content component class instead of retrieving it in the view class. I get a
 ForbiddenAttribute error when viewing the class

Please note, that ForbiddenAttribute is also raised, when an object has no 
such attribute. I'd recommend to check (e.g. via dir(object)) if the 
attribute really exists.

I'm no expert in Zope security, but I assume that ForbiddenAttribute is 
raised, as no permission is known for the attribute, simply, because it does 
not exist.


GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9  4902 64B4 D16B 2998 93C7
Zope3-users mailing list

Re: [Zope3-Users] ForbiddenAttribute error

2007-07-06 Thread Dennis Noordsij


 Haven't I declared the getRawFeedData method by including it in the IFeed


 /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, and not 

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.


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

Zope3-users mailing list

Re: [Zope3-Users] ForbiddenAttribute error

2007-07-06 Thread Dennis Noordsij

HA! I spoke too soon.

Your permissions are OK, zope.View has the right permissions. Sorry about 

Check the permissions on entries in your feed, that's where the backtrace 
points to.


Zope3-users mailing list

Re: [Zope3-Users] ForbiddenAttribute error

2007-07-06 Thread Maciej Wisniowski
 I get a
 ForbiddenAttribute error when viewing the class
AFAIR ForbiddenAttribute means that you have no
permissions for attribute you want to access.
No permissions means that it is neither allowed
nor denied :)

You're using feed.entries:

 result+=[(e.updated_parsed,, e) for e in
 feed.entries ]

Seems that 'entries' are the cause of error (as Dennis already said)
or something in this line.

If 'feed' above is of type Feed then your's IFeed doesn't
specify 'entries' attribute in it. This means no permissions
are set to 'entries' and this may cause ForbiddenAttribute

You may use pdb to simply debug what exactly causes the error.

Maciej Wisniowski
Zope3-users mailing list

Re: [Zope3-Users] ForbiddenAttribute error when adding a container

2005-09-15 Thread baiju m
On 9/14/05, Maciej Pietrzak [EMAIL PROTECTED] wrote:
 My guess is that you forgot to specify permissions for container interface.
 Add require permission=zope.View (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):


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

With thanks,
Baiju M
Zope3-users mailing list