[Zope] Quick question on ZSQL methods...

Rob Page rob.page@digicool.com
Thu, 9 Sep 1999 06:01:56 -0400


> AUTHENTICATED_USER is in the arguments list, isn't it?
> 
> Alternatively, you could put 'username' in the argument list, then
> call it with "sqlmeth(username=AUTHENTICATED_USER.getUserName())"

FWIW, this is how I ALWAYS approach this issue.  Sending
AUTHENTICATED_USER to the SQLMethods, IMO, makes testing a PITA since
you're likely to be logged in as superuser and there are no superuser
records in your database.  Using user_id/username as Anthony mentioned
let's me hijack the call without hassling with another browser session,
etc..  

In addition, I find there are other instances where I'll need info on
some other user.  If I've wired the SQL to AUTHENTICATED_USER, I either
(a) can't ask the question or (b) end up duplicating (ick).

--Rob