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

Dieter Maurer dieter@handshake.de
Sat, 9 Feb 2002 20:00:04 +0100


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