On Friday 23 February 2007 19:29:10 you wrote:
> On 2/23/07, Svenn Helge Grindhaug <[EMAIL PROTECTED]> wrote:
> > 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.
>
> This is where I find it easier to keep the specialized parts of the
> interface separate from the other aspects (like IContainer), but
> that's a style issue as much as anything.

Are you talking about the same separation as Christophe did, create a 
ICourseDetail in addition to ICourse. That do not change the way the 
configuration is done, or does it?

> >     <class class=".course.Course">
> >         <implements
> >             interface=".interfaces.ICourse
> >                        zope.annotation.interfaces.IAttributeAnnotatable"
> >             />
> >         <require
> >             permission="zope.View"
> >             interface=".interfaces.ICourse"
> >             />
>
> It's worth knowing that you can specify multiple interfaces here,
> seperated by spaces.  You can also combine interface="..." with
> attributes="...".
>
> >         <require
> >             permission="zope.ManageContent"
> >             set_schema=".interfaces.ICourse"
> >             />
>
> set_schema can also take multiple, space-separated schema, and
> set_attributes="..." can be included as well.

Like this then?

    <class class=".course.Course">
        <implements
            interface=".interfaces.ICourse
                       zope.annotation.interfaces.IAttributeAnnotatable"
            />
        <require
            permission="zope.View"
            interface="zope.app.container.interfaces.IReadContainer"
            attributes="shortDesc"
            />
        <require
            permission="zope.ManageContent"
            interface="zope.app.container.interfaces.IWriteContainer"
            set_attributes="shortDesc"
            />
    </class>

Svenn.
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to