[Zope-CMF] Accessing methods of ZClass based portal content.

Gilles Lenfant gilles@objectis.net
Mon, 11 Feb 2002 16:49:26 +0100


Dieter,

I checked the permission mapping that seems correct.
The View permission enables this method.
I got the same error whatever's the role of the user.

It seems that the ZClass based CMF content objects do not support
inheritance.
Except for the methods that are mapped to actions in the CMF type tool !!!


----- Original Message -----
From: "Dieter Maurer" <dieter@handshake.de>
To: "Gilles Lenfant" <gilles@objectis.net>
Cc: <zope-cmf@zope.org>
Sent: Saturday, February 09, 2002 8:00 PM
Subject: Re: [Zope-CMF] Accessing methods of ZClass based portal content.


> Gilles Lenfant writes:
>  > I have built some portal_types based on ZClasses (subclassing
>  > PortalContent).
>  > I mapped the usual actions (view + edit) to some methods of the ZClass.
>  > Till now it's OK for adding/editing those objects.
>  >
>  > But I always got a KeyError / ErrorValue : mymethod when trying to get
the
>  > result of any method defined in the ZClass.
>  >
>  > In example :
>  >
>  > <dtml-with myobject>
>  > <dtml-var datafrompropertysheet> --> OK
>  > <dtml-var DTMLmethodfromZCalss> --> KeyError...
>  > </dtml-with>
>  >
>  > I can't understand,
> Maybe, you did not map the necessary permissions in the "Define
Permissions"
> tab of your ZClass. In some cases, "Unauthorized" is mapped to "KeyError"
> (I think, this should not happen, but unfortunately, it does).
>
>
> Dieter
>