Can't return / publish object of a dictionary?
Hi zopers, my class has a list with several objects in it. When calling my self written _getOb() method, I want to return one of these objects. But I get an Unauthorized... When I put an object of the same type into a normal class attribute (self.dummyObject), return of that object from _getOb() works perfectly. What am I doing wrong? Thanks a lot! -- Lars Heber T-Systems GEI GmbH Hausanschrift: Clausstrasse 3, 09126 Chemnitz Postanschrift: Clausstrasse 3, 09126 Chemnitz Telefon : (+49 371) 5359-271 Fax : (+49 371) 5359-133 E-Mail : Lars.Heber@t-systems.com Internet: http://www.t-systems.de
Sounds like an acquisition problem to me. Are the objects wrapped? Try def _getOb(..): ... return someobject.__of__(self) Lars Heber wrote:
Hi zopers,
my class has a list with several objects in it. When calling my self written _getOb() method, I want to return one of these objects. But I get an Unauthorized...
When I put an object of the same type into a normal class attribute (self.dummyObject), return of that object from _getOb() works perfectly.
What am I doing wrong?
Thanks a lot!
Lars, I believe that for security validation to work the object you return has to be acquisition wrapped. Try something like (untested): def _getOb(self, id): return self._secretList[id].__of__(self) HTH, Stefan --On Donnerstag, 16. Jänner 2003 16:51 +0100 Lars Heber <Lars.Heber@t-systems.com> wrote:
Hi zopers,
my class has a list with several objects in it. When calling my self written _getOb() method, I want to return one of these objects. But I get an Unauthorized...
When I put an object of the same type into a normal class attribute (self.dummyObject), return of that object from _getOb() works perfectly.
What am I doing wrong?
Thanks a lot!
-- Those who write software only for pay should go hurt some other field. /Erik Naggum/
participants (3)
-
Lars Heber -
seb bacon -
Stefan H. Holek