[Zope3-Users] Schema fields vs custom metadata
Svenn Helge Grindhaug
Svenn.Helge.Grindhaug at bccs.uib.no
Fri Feb 23 13:19:50 EST 2007
On Friday 23 February 2007 18:38:23 you wrote:
> On 2/23/07, Svenn Helge Grindhaug <Svenn.Helge.Grindhaug at bccs.uib.no> wrote:
> > This is what I thought as well, but I got stuck leading me to think I
> > should implement the information as meta data. I get a forbiddenAttribute
> > error (see below) after adding a course and trying to enter the newly
> > created folder. Could you please tell me what I missing here.
>
> You didn't grant access to shortDesc for any permission. The use of a
> schema field to describe the values doesn't cause permissions to be
> specified.
I did the some changes (below), and now it works :-) Thanks!
I tried different ways of adding the permissions for IWriteContainer and
IReadContainer without any luck. Can you tell me how to combine those and the
permissions for ICourse schema.
class Course(BTreeContainer):
#implements(ICourse) <- now in configure.zcml
shortDesc = u''
<-- configure -->
<class class=".course.Course">
<implements
interface=".interfaces.ICourse
zope.annotation.interfaces.IAttributeAnnotatable"
/>
<require
permission="zope.View"
interface=".interfaces.ICourse"
/>
<require
permission="zope.ManageContent"
set_schema=".interfaces.ICourse"
/>
</class>
Svenn.
More information about the Zope3-users
mailing list