[Zope] Enumerating owners

Andy McKay andy@agmweb.ca
Wed, 28 Aug 2002 17:11:33 -0700


Try owner_info rather than getOwner, the former needs View management screen
permission.

Something like:

obj = context.restrictedTraverse('/Test') # get the Test object
return obj.owner_info()
--
  Andy McKay
  Agmweb Consulting
  http://www.agmweb.ca

----- Original Message -----
From: "Michael S. Fischer" <michael@dynamine.net>
To: "Andy McKay" <andy@agmweb.ca>
Cc: <zope@zope.org>
Sent: Wednesday, August 28, 2002 4:56 PM
Subject: Re: [Zope] Enumerating owners


> On Wed, Aug 28, 2002 at 04:45:01PM -0700, Andy McKay wrote:
>
> > > Unfortunately, it looks like the the getOwner method of the Owned
mixin
> > > class is very useful as it won't work in an anonymous security
context.
> >
> > Right, but if you put that in a Python Script say, and give it the proxy
> > role of Manager...
>
> I just tried.  I created a Python Script called fileOwner:
>
> return context.getOwner(1)
>
> I then gave the script a proxy role of Manager, and then tried to call
> it (http://host/path/fileOwner), and I got a 401 in response.
>
> --
> Michael S. Fischer / michael at dynamine.net / +1 650-533-4684
> Lead Hacketeer, Dynamine Consulting, Silicon Valley, CA
>