[CMF-checkins] CVS: CMF/CMFCore - ActionInformation.py:1.3

Florent Guillaume fg@nuxeo.com
Fri, 28 Jun 2002 20:07:34 -0400

Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv12476/CMFCore

Modified Files:
Log Message:
Made the id of the current user available to old action providers
(DCWorkflow being a prime example) as 'user_id' (Tracker #495).

Modern action providers use TAL with an expression context that already
has a 'member' value.

=== CMF/CMFCore/ActionInformation.py 1.2 => 1.3 ===
         membership = getToolByName(tool, 'portal_membership')
         self.isAnonymous = membership.isAnonymousUser()
+        self.user_id = membership.getAuthenticatedMember().getUserName()
         self.portal_url = portal.absolute_url()
         if folder is not None:
             self.folder_url = folder.absolute_url()