[Zope] Accessing acl_users in __init__() of Python Product

Dieter Maurer dieter@handshake.de
Fri, 4 Jul 2003 21:43:00 +0200


Thomas G=FCttler wrote at 2003-7-2 17:28 +0200:
 > I need to access acl_users of the parent in the constructor
 > of a python product. Acquisition seems to fail in this situation.

When you think about it you will recognize that the object
cannot be acquisition wrapped in the constructor.
Or expressed differently: it cannot yet know its parent.

You must pass the parent into the constructor (when you need it there)
or delay your parent dependent operation until "manage_afterAdd".
Be careful, though, as "manage_afterAdd" is called also during copy
and import.


Dieter