[Zope3-Users] Schema fields vs custom metadata
Fred Drake
fdrake at gmail.com
Fri Feb 23 13:29:10 EST 2007
On 2/23/07, Svenn Helge Grindhaug <Svenn.Helge.Grindhaug at bccs.uib.no> 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.
> <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.
-Fred
--
Fred L. Drake, Jr. <fdrake at gmail.com>
"Every sin is the result of a collaboration." --Lucius Annaeus Seneca
More information about the Zope3-users
mailing list