[Zope] AUTHENTICATED_USER considered harmfull :)

Stuart Woolford stuartw@newmail.net
Wed, 22 Sep 1999 11:33:18 +1200


Having just spent 2 days debugging a Zope 2.0 problem (due to my own stupidity)
I finally fixed the problem by changing one of the dozens of references to
AUTHENTICATED_USER to AUTHENTICATED_USER.name - the first of course returns a
user object, the second returns a text string.

This is something to watch out for, as of course a <dtml-var
AUTHENTICATED_USER> prints out a string (which does NOT mean it contains one,
it just means iut renders as one!) and therefore this problem can be
non-obvious..

i know this has been posted before, but newbies like myself meed constant
reminders :)

BTW, in another direction, has does anyone know why the default DTML
in Zope 2.0 atr formated in the old style, not the new <dtml-var > style? I
prefer the later a LOT, but cannot usually be bothered changing the default
contents (too busy adding great new bits ;)

 --
------------------------------------------------------------
Stuart Woolford, stuartw@newmail.net
Unix Consultant.
Software Developer.
Supra Club of New Zealand.
------------------------------------------------------------