[Zope] SecurityGetUser -- no such method?

dman dman@dman.ddts.net
Thu, 25 Apr 2002 20:59:06 -0500


--J/dobhs11T7y2rNN
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Apr 26, 2002 at 01:29:55AM +0200, Maik Jablonski wrote:
| dman wrote:
| > I have a Python Script that needs to find out the name of the
| > currently authenticated user.  I saw docs that say to use
| > SecurityGetUser() and provide some sample DTML.  I can't seem to find
| > that method anywhere in my Python Script (and the lack of dir()
| > doesn't help me find it).  Using REQUEST.AUTHENTICATED_USER seems to
| > work, but is that the Right Way to do it?
|=20
| hi,
|=20
| something like this should work in a Python-Script:
|=20
| import AccessControl
| print AccessControl.getSecurityManager().getUser()
| return printed

That does it.  Thanks!

-D

--=20

The fear of the Lord leads to life:
Then one rests content, untouched by trouble.
        Proverbs 19:23
=20
GnuPG key : http://dman.ddts.net/~dman/public_key.gpg


--J/dobhs11T7y2rNN
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjzItGoACgkQO8l8XBKTpRRPfQCffLH5qkVbwTu97faB2opsXrTa
tkwAnAzmciWK4qL2exFi59WjrHJ3vPa1
=gkpN
-----END PGP SIGNATURE-----

--J/dobhs11T7y2rNN--