[Zope] Help: Unzuthorized Context on sub-object of product
sub-class
jkinsley
jkinsley@bticc.net
Mon, 16 Jun 2003 23:06:10 -0400 (EDT)
On Mon, 16 Jun 2003, Dieter Maurer wrote:
> Date: Mon, 16 Jun 2003 22:55:21 +0200
> From: Dieter Maurer <dieter@handshake.de>
> To: jkinsley <jkinsley@bticc.net>
> Cc: zope@zope.org
> Subject: Re: [Zope] Help: Unzuthorized Context on sub-object of product
> sub-class
>
> Does your "getType" has a security declaration?
> Does the class derive from "Acquisition.{Im|Ex}plicit"?
> Did you call "InitializeClass" on your class?
> Is your instance correctly acquisition wrapped?
>
> For details, please read the security section in the
> Zope Developer Guide.
>
>
> Dieter
>
The "getType" is in a pure Python object. That is why I am stumped
with this. I would like to have access to the pure Python objects
through Zope based superclass without having to write parallel Zope
objects for the entire object structure. The reason being some of
the objects are being used outside of Zope and I want to also be able
to work with the objects within Zope. I do not know if this possible
or not. For example:
class PI:
""" Pure Python object """
def getType(self): return self._type
class PIC:
""" Pure Python collection of PI objects """
class PU:
""" Another pure Python object """
class PQ:
""" Pure Python object """
def __init__(self, q): self._q = PIC(q)
def getQItems(self): return self._q.getItems()
class PUQ(PU, PQ):
""" Pure Python Object """
class PT:
""" Pure Python Pbject """
class PL(PUQ, PT):
""" Pure Python object """
Everything up to this point is pure Python.
class ZL(SimpleItem, PL)
""" Zope version of PL """
Now I want to be able to create a ZL instance in Zope and be able to
access some of the pure Python objects via a PageTemplate associated
with ZL.
<table>
<tr tal:repeat="qi here/getQItems"> <!-- This works properly -->
<td tal:content="qi/getType">Type</td>
</tr>
</table>
Of course that is just the read part I am trying to accomplish. I
also want to be able to change the data contained in the PI object as
well as add/delete PI objects from the PIC container through methods
defined in PQ. So far everything has worked up to this point. I
have studied the security section of the ZDG, I can not find anything
relating to such a complex example.
I hope this better explains what I want to do.
Regards,
Jarrod Kinsley