SecurityGetUser -- no such method?
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? TIA, -D -- (A)bort, (R)etry, (T)ake down entire network? GnuPG key : http://dman.ddts.net/~dman/public_key.gpg
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?
TIA, -D
hi, something like this should work in a Python-Script: import AccessControl print AccessControl.getSecurityManager().getUser() return printed greetings, maik. -- maik jablonski http://www.sachunterricht-online.de universitaet bielefeld http://www.zfl.uni-bielefeld.de zentrum fuer lehrerbildung tlph://+49.(0).521.106.4234
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? | | hi, | | something like this should work in a Python-Script: | | import AccessControl | print AccessControl.getSecurityManager().getUser() | return printed That does it. Thanks! -D -- The fear of the Lord leads to life: Then one rests content, untouched by trouble. Proverbs 19:23 GnuPG key : http://dman.ddts.net/~dman/public_key.gpg
participants (2)
-
dman -
Maik Jablonski