[Zope3-Users] Re: lack of security declaration: bug or feature?

Philipp von Weitersehausen philipp at weitershausen.de
Fri Nov 2 17:32:10 EDT 2007


Lorenzo Gil Sanchez wrote:
> Hi,
> 
> I'm using zope.app.container.ordered.OrderedContainer in my application
> and I got this error:
> 
> ForbiddenAttribute: ('__getitem__',
> <zope.app.container.ordered.OrderedContainer object at 0xaf5aa6c>)
> 
> I added this lines to my configure.zcml:
> 
>   <class class="zope.app.container.ordered.OrderedContainer">
>     <require
>         permission="zope.ManageContent"
>         interface="zope.app.container.interfaces.IOrderedContainer"
>         />
>   </class>
> 
> and that fixed the error.
> 
> It's totally ok when it's adding security declarations to my classes but
> I feel a little bit awkward addind security declarations to Zope
> classes.
> 
> Is this the right way to do? Shouldn't those lines belong to
> zope.app.container's configure.zcml file?

I think OrderedContainer is a base class for your own container types. I 
don't see a problem if it doesn't have security declarations.

By the way, you probably want to split up your security declarations 
into read and write...



More information about the Zope3-users mailing list