[Zope-dev] 2.1.6 and REQUEST.AUTHENTICATED_USER in ZSQL
Stuart 'Zen' Bishop
zen@cs.rmit.edu.au
Wed, 29 Mar 2000 11:13:16 +1000 (EST)
I upgraded my Zope site last night from 2.1.4 to 2.1.6, which appeared
to go happily until I just got in a fault report from one of my helpdesk
staff.
One of my ZSQL methods is now failing:
insert into blah(stuff,responsible)
values (
<dtml-sqlvar stuff type=nb>,
<dtml-sqlvar expr="REQUEST.AUTHENTICATED_USER.getUserName()"
type=nb>)
This is now failing with 'Missing input variable,
REQUEST.AUTHENTICATED_USER.getUserName()'
Is my syntax correct and this is a bug/feature introduced in 2.1.6?
Or should I be doing this some other way? If possible, I need to extract
the currently authenticated user in the ZSQL method so the operator
can't spoof it, and without mucking around with proxy roles.
Traceback (innermost last):
File /nfs/echidna/r/www/zope/zope2/lib/python/ZPublisher/Publish.py, line 214, in publish_module
File /nfs/echidna/r/www/zope/zope2/lib/python/ZPublisher/Publish.py, line 179, in publish
File /nfs/echidna/r/www/zope/zope2/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook
(Object: ElementWithAttributes)
File /nfs/echidna/r/www/zope/zope2/lib/python/ZPublisher/Publish.py, line 165, in publish
File /nfs/echidna/r/www/zope/zope2/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: ntpasshandle)
File /nfs/echidna/r/www/zope/zope2/lib/python/ZPublisher/Publish.py, line 102, in call_object
(Object: ntpasshandle)
File /nfs/echidna/r/www/zope/zope2/lib/python/OFS/DTMLMethod.py, line 150, in __call__
(Object: ntpasshandle)
File /nfs/echidna/r/www/zope/zope2/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__
(Object: ntpasshandle)
File /nfs/echidna/r/www/zope/zope2/lib/python/DocumentTemplate/DT_Util.py, line 335, in eval
(Object: qNTPass(uname=uname,password=pw))
(Info: pw)
File <string>, line 0, in ?
File /nfs/echidna/r/www/zope/zope2/lib/python/Shared/DC/ZRDB/DA.py, line 424, in __call__
(Object: qNTPass)
File /nfs/echidna/r/www/zope/zope2/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__
(Object: <string>)
File /nfs/echidna/r/www/zope/zope2/lib/python/Shared/DC/ZRDB/sqlvar.py, line 168, in render
(Object: REQUEST.AUTHENTICATED_USER.getUserName())
Missing Input: (see above)
--
___
// Zen (alias Stuart Bishop) Work: zen@cs.rmit.edu.au
// E N Senior Systems Alchemist Play: zen@shangri-la.dropbear.id.au
//__ Computer Science, RMIT WWW: http://www.cs.rmit.edu.au/~zen