[Zope-CMF] how do I get autenticated user

Robert Rottermann robert@redcor.ch
Mon, 26 Nov 2001 15:09:24 +0100


It is Zope 2.4.2

----- Original Message -----
From: "Jens Vagelpohl" <jens@zope.com>
To: "Robert Rottermann" <robert@redcor.ch>
Cc: <zope-cmf@zope.org>
Sent: Monday, November 26, 2001 2:53 PM
Subject: Re: [Zope-CMF] how do I get autenticated user


> what version of zope are you using?
>
> some versions prior to 2.4.1 or so had a "shortcut" in the security
> mechanism which applied to objects that were publicly accessible. it sped
> up security processing a little but as a side affect the user would appear
> to be anonymous during the execution of publicly accessible code.
>
> jens
>
>
> On Monday, November 26, 2001, at 08:47 , Robert Rottermann wrote:
>
> > Hi there,
> >
> > I try to get the authenticated user from within breadcrumbs.py
> > I tried it as follows but it does not work.
> >
> > Thanks
> > Robert
> >
> > portal = context.portal_url.getPortalObject()
> > pm =  context.getToolByName(portal, 'portal_membership')
> > member = pm.getAuthenticatedMember()
> >
> > if(mtool.getAuthenticatedMember.hasRole( context, ['Mitarbeiter'] )):
> >    root_url = "%s/folder_contents" % portal_url
> > else:
> >    root_url = portal_url
> >
> >
> >
> > _______________________________________________
> > Zope-CMF maillist  -  Zope-CMF@zope.org
> > http://lists.zope.org/mailman/listinfo/zope-cmf
> >
> > See http://www.zope.org/Products/PTK/Tracker for bug reports and feature
> > requests
>
>
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
>
> See http://www.zope.org/Products/PTK/Tracker for bug reports and feature
requests
>