[Zope] Anonymous user object
Chris McDonough
chrism@zope.com
23 May 2003 10:03:11 -0400
Not from a Python Script, but from trusted code:
from AccessControl.User import nobody
return nobody.has_permission('View', object)
On Fri, 2003-05-23 at 06:46, Gilles Lenfant wrote:
> ----- Original Message -----
> From: "Magnus Heino" <magnus.heino@home.se>
> To: "Gilles Lenfant" <gilles@pilotsystems.net>
> Cc: <zope@zope.org>
> Sent: Friday, May 23, 2003 12:16 PM
> Subject: Re: [Zope] Anonymous user object
>
>
> >
> > > I need to get the "Anonymous user" object from a Python script.
> >
> >
> > http://www.zopelabs.com/cookbook/1020444358
> >
> > /Magnus
> >
> >
>
> Magnus,
>
> I know this. This provides the ACTUAL user object, not the anonymous one.
> As stated in my original post, I need the *anonymous* use obj, whatever's
> the role(s) ot the current user.
>
> To be more precise I need to run something like :
>
> anonymousUserObject.has_permission('View', someobject)
>
> Thanks anyway
>
> --Gilles
>
>
>
> _______________________________________________
> Zope maillist - Zope@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 )