[Zope-dev] CoreSessionTracking

Adrian Hungate ahungate@acucorp.com
Mon, 23 Apr 2001 09:00:15 -0700


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C0CC0E.83D20940
Content-Type: text/plain;
	charset="iso-8859-1"

Do you mean:

 from AccessControl import getSecurityManager

 security = getSecurityManager()
 user = security.getUser()
 userName = user.getUserName()

???

Adrian...

-----Original Message-----
From: Chris Withers [mailto:chrisw@nipltd.com]
Sent: Monday, 23 April 2001 16:57
To: Chris McDonough
Cc: Magnus Heino (Rivermen); zope-dev@zope.org
Subject: Re: [Zope-dev] CoreSessionTracking


Chris McDonough wrote:
> 
> Alternately (and this will be in the next CST release), add this to the
> session data object class (SessionData.SessionData):
> 
> __guarded_setitem__ = __setitem__

OK, that'll teach me to read the whole thread before I post :-)

> As far as finding the currently logged in user's name, try this:
> 
> context.REQUEST['AUTHENTICATED_USER'].getUserName()
> 
> This is a deprecated API, however.  The new one I can't find at the
moment,
> though.  ;-)

When you find out, can you let us know :-S

Chris

_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

------_=_NextPart_001_01C0CC0E.83D20940
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2650.12">
<TITLE>RE: [Zope-dev] CoreSessionTracking</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Do you mean:</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp;from AccessControl import =
getSecurityManager</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp;security =3D getSecurityManager()</FONT>
<BR><FONT SIZE=3D2>&nbsp;user =3D security.getUser()</FONT>
<BR><FONT SIZE=3D2>&nbsp;userName =3D user.getUserName()</FONT>
</P>

<P><FONT SIZE=3D2>???</FONT>
</P>

<P><FONT SIZE=3D2>Adrian...</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Chris Withers [<A =
HREF=3D"mailto:chrisw@nipltd.com">mailto:chrisw@nipltd.com</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Monday, 23 April 2001 16:57</FONT>
<BR><FONT SIZE=3D2>To: Chris McDonough</FONT>
<BR><FONT SIZE=3D2>Cc: Magnus Heino (Rivermen); =
zope-dev@zope.org</FONT>
<BR><FONT SIZE=3D2>Subject: Re: [Zope-dev] CoreSessionTracking</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Chris McDonough wrote:</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Alternately (and this will be in the next CST =
release), add this to the</FONT>
<BR><FONT SIZE=3D2>&gt; session data object class =
(SessionData.SessionData):</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; __guarded_setitem__ =3D __setitem__</FONT>
</P>

<P><FONT SIZE=3D2>OK, that'll teach me to read the whole thread before =
I post :-)</FONT>
</P>

<P><FONT SIZE=3D2>&gt; As far as finding the currently logged in user's =
name, try this:</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; =
context.REQUEST['AUTHENTICATED_USER'].getUserName()</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; This is a deprecated API, however.&nbsp; The =
new one I can't find at the moment,</FONT>
<BR><FONT SIZE=3D2>&gt; though.&nbsp; ;-)</FONT>
</P>

<P><FONT SIZE=3D2>When you find out, can you let us know :-S</FONT>
</P>

<P><FONT SIZE=3D2>Chris</FONT>
</P>

<P><FONT =
SIZE=3D2>_______________________________________________</FONT>
<BR><FONT SIZE=3D2>Zope-Dev maillist&nbsp; -&nbsp; =
Zope-Dev@zope.org</FONT>
<BR><FONT SIZE=3D2><A =
HREF=3D"http://lists.zope.org/mailman/listinfo/zope-dev" =
TARGET=3D"_blank">http://lists.zope.org/mailman/listinfo/zope-dev</A></F=
ONT>
<BR><FONT SIZE=3D2>**&nbsp; No cross posts or HTML encoding!&nbsp; =
**</FONT>
<BR><FONT SIZE=3D2>(Related lists - </FONT>
<BR><FONT SIZE=3D2>&nbsp;<A =
HREF=3D"http://lists.zope.org/mailman/listinfo/zope-announce" =
TARGET=3D"_blank">http://lists.zope.org/mailman/listinfo/zope-announce</=
A></FONT>
<BR><FONT SIZE=3D2>&nbsp;<A =
HREF=3D"http://lists.zope.org/mailman/listinfo/zope" =
TARGET=3D"_blank">http://lists.zope.org/mailman/listinfo/zope</A> =
)</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C0CC0E.83D20940--