[Zope] proxy role for an external method

Peter Bengtsson peter at fry-it.com
Mon Oct 10 18:14:55 EDT 2005


2005/10/10, Reinoud van Leeuwen <reinoud.v at n.leeuwen.net>:
> On Mon, Oct 10, 2005 at 10:57:25PM +0100, Peter Bengtsson wrote:
> > 2005/10/10, Reinoud van Leeuwen <reinoud.v at n.leeuwen.net>:
> > > On Mon, Oct 10, 2005 at 07:27:11PM +0200, Andreas Jung wrote:
> > > > Are you using CMF/Plone?
> > >
> > > yes. the main part of the function is:
> > >
> > >    for brain in self.portal_catalog(portal_type='User',
> > >                                         SearchableText=SearchableText):
> > >         user = brain.getObject()
> > >         if user is None:
> > >             continue
> > >         results.append(getUserInfo(user))
> > >
> > > This works in a pyhton script but not in an external one
> > >
> >
> > I find this hard to believe. But, for the External Method you might
> > need to allow Anonymous to View it if it's at all protected.
>
> Done that
> > What's the output when you do it via xmlrpc? Is it [] or error?
> []

Can you then debug wether it that's because portal_catalog(**kws)
doesn't return anything or because brain.getObject() constantly
returns None?

>
> I understood that Plone does some extra magic, so I have to setup a
> securoty context... I'll post it here if I have a working solution
>
Shouldn't really be the problem. Isn't portal_catalog just another
ZCatalog that has nothing to do with Plone except it's located inside
a Plone instance.

> --
> __________________________________________________
> "Nothing is as subjective as reality"
> Reinoud van Leeuwen    reinoud.v at n.leeuwen.net
> http://www.xs4all.nl/~reinoud
> __________________________________________________
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>


--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com


More information about the Zope mailing list