Re: [Zope3-Users] Re: how to know if a principal has the right permissions

2006-08-28 Thread Philipp von Weitershausen
Lorenzo Gil Sanchez wrote: El dom, 27-08-2006 a las 23:53 +0200, Philipp von Weitershausen escribió: zope.security.canAccess zope.security.canWrite Nice, I didn't know about those and I ended writing my own solution: def canAdd(self): interaction = ZopeSecurityPolicy()

Re: [Zope3-Users] Re: how to know if a principal has the right permissions

2006-08-28 Thread Philipp von Weitershausen
Lorenzo Gil Sanchez wrote: Right. Because you're not supposed to poke at __data. The two underscores should scare you off! By the way, this is a rule of thumb: Whenever you get ForbiddenAttribute errors, you're doing something wrong. Either: 1. you're missing security declarations

Re: [Zope3-Users] Re: how to know if a principal has the right permissions

2006-08-28 Thread Lorenzo Gil Sanchez
El lun, 28-08-2006 a las 20:49 +0200, Philipp von Weitershausen escribió: Lorenzo Gil Sanchez wrote: Right. Because you're not supposed to poke at __data. The two underscores should scare you off! By the way, this is a rule of thumb: Whenever you get ForbiddenAttribute errors, you're

Re: [Zope3-Users] Re: how to know if a principal has the right permissions

2006-08-28 Thread Philipp von Weitershausen
Lorenzo Gil Sanchez wrote: El lun, 28-08-2006 a las 20:49 +0200, Philipp von Weitershausen escribió: Lorenzo Gil Sanchez wrote: Right. Because you're not supposed to poke at __data. The two underscores should scare you off! By the way, this is a rule of thumb: Whenever you get

[Zope3-Users] Re: how to know if a principal has the right permissions

2006-08-27 Thread Philipp von Weitershausen
Lorenzo Gil Sanchez wrote: Hello, I have a INewsItem content type that anonynmous users can see but only editors can create/edit/remove. I have a view which list all my news items. I want to show links from this view to the add, edit and remove views for every news item but only if the