[Zope] Obtaining the User's Name from a Python Script in Zope

Tom Nichols tom@westlong.com
Mon, 21 Jul 2003 11:02:12 -0600


This is a multi-part message in MIME format.

------=_NextPart_000_000A_01C34F77.8AF3EC90
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

I have used the getUserName() function in page templates and passed that
name as a parameter to python scripts in Zope.  But, now I need to
independently verify the authenticated user from a script, not relying
on anything passed in from a page.  Is it possible to do so, and if so,
how?  The basic need is to obtain the logged in user's name from a
script directly from Zope from within a python script.  

 

If this should be posted to another list, please let me know. 

 

Regards, 

 

Tom Nichols

tom@westlong.com


------=_NextPart_000_000A_01C34F77.8AF3EC90
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html>

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">


<meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)">

<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{font-family:Arial;
	color:windowtext;}
@page Section1
	{size:612.0pt 792.0pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I have used the getUserName() function in page =
templates and
passed that name as a parameter to python scripts in Zope. &nbsp;But, =
now I
need to independently verify the authenticated user from a script, not =
relying
on anything passed in from a page. &nbsp;Is it possible to do so, and if =
so,
how?&nbsp; The basic need is to obtain the logged in user&#8217;s name =
from a
script directly from Zope from within a python script.&nbsp; =
</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>If this should be posted to another list, please let =
me know.
</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Regards, </span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Tom Nichols</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>tom@westlong.com</span></font></p>

</div>

</body>

</html>

------=_NextPart_000_000A_01C34F77.8AF3EC90--