[Zope] CorpCalendar 1.4 and 1.7 issues

Andreas Jung lists at zopyx.com
Thu Mar 22 13:26:02 EDT 2007



--On 22. März 2007 14:09:00 -0400 Thomas Bennett <bennetttm at appstate.edu> 
wrote:

> Long story short:
>
> Is it appropriate to change
>   self.REQUEST.AUTHENTICATED_USER.name
> to
>   self.REQUEST.REMOTE_USER
> ?
>

Using AUTHENTICATED_USER isn't recommended (since ages). You should always
use the SecurityManager API:

from AccessControl import getSecurityManager

user = getSecurityManager().getUser()
username = user.getUserName()

Changing request parameters as a workaround for stinking code is
unlikely a good choice. Better fix the related code instead of messing
up the REQUEST.

-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20070322/c47a6076/attachment.bin


More information about the Zope mailing list