Hi, does anyone know if its possible to ascertain the current NT username through python, or how this could be done through a DTML document? I presume its available throught the windows API - can this be accessed by python? Thanks, Richard _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx
If you download the ActiveState Python Distribution you will find Windows Help files documenting the Python Modules, including one called PythonWin32Extensions. This has a section on NT Security, including getting the current username - this uses the win32security and other win32 modules which all come with the ActiveState distribution, providing a wrapper to the NT Security API. To use this in Zope you'd have to write an External Method that uses these modules, and to make sure that Zope can find these modules (most likely copying them from the Python distribution into the Zope installation). This should then be a relatively simple External Method to create. Hope this helps, David Burton 16/05/2002 18:21:50, "Richard McKinley" <richard_mckinley@hotmail.com> wrote:
Hi,
does anyone know if its possible to ascertain the current NT username through python, or how this could be done through a DTML document? I presume its available throught the windows API - can this be accessed by python?
Thanks, Richard
_________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
"Into the abyss we stare, hoping that the abyss does not gaze so intently upon us"
David Burton wrote:
To use this in Zope you'd have to write an External Method that uses these modules, and to make sure that Zope can find these modules (most likely copying them from the Python distribution into the Zope installation).
Bear in mind that doing that all you'll succeed is finding out the current username that Zope is running under on the server... cheers, Chris
participants (3)
-
Chris Withers -
David Burton -
Richard McKinley