[z3-five] ZCML security declarations and properties
Martin Aspeli
optilude at gmx.net
Tue Apr 17 02:03:51 CEST 2007
Hi guys,
I have an interface that defines various properties:
class IFoo(Interface):
bar = schema.TextLine(...)
class Foo(SimpleItem):
implements(IBar)
bar = property(...)
I then have this in ZCML:
<class class=".foo.Foo"
<require
permission="zope2.View"
interface=".interfaces.IFoo
/>
<require
permission="cmf.ModifyPortalContent"
set_schema=".interfaces.Foo
/>
</class>
However, if I try to do
<span tal:content="context/getPhone">Phone number</span>
in a page ViewPageTemplateFile in a Z3 view (i.e. trusted code), I get:
Unauthorized: You are not allowed to access 'bar' in this context
This is with verbose-security on, but not much help there...
What am I missing here? Why is this happening even in trusted code?
Martin
More information about the z3-five
mailing list