[CMF-checkins] CVS: CMF/CMFStaging/skins/staging - get_status_image.py:1.2 object_status_block.pt:1.4
Chris McDonough
chrism@zope.com
Thu, 17 Oct 2002 15:39:07 -0400
Update of /cvs-repository/CMF/CMFStaging/skins/staging
In directory cvs.zope.org:/tmp/cvs-serv16445/CMFStaging/skins/staging
Modified Files:
get_status_image.py object_status_block.pt
Log Message:
- Multimodule checkin to convert calls from user.getUserName() to
user.getId() where appropriate. User names should not be used
as immutable references, while user ids should. The distinction
is not clearly enforcd in the stock user folder or any current user
folder implementations, but newer user folder implementations
will rely upon it.
=== CMF/CMFStaging/skins/staging/get_status_image.py 1.1 => 1.2 ===
--- CMF/CMFStaging/skins/staging/get_status_image.py:1.1 Tue May 14 13:54:53 2002
+++ CMF/CMFStaging/skins/staging/get_status_image.py Thu Oct 17 15:38:36 2002
@@ -10,9 +10,9 @@
if locker:
from AccessControl import getSecurityManager
- username = getSecurityManager().getUser().getUserName()
+ uid = getSecurityManager().getUser().getId()
- if locker == username:
+ if locker == uid:
return getattr(context, "status_locked.gif")
else:
return getattr(context, "status_locked_out.gif")
=== CMF/CMFStaging/skins/staging/object_status_block.pt 1.3 => 1.4 ===
--- CMF/CMFStaging/skins/staging/object_status_block.pt:1.3 Mon Aug 5 12:17:31 2002
+++ CMF/CMFStaging/skins/staging/object_status_block.pt Thu Oct 17 15:38:36 2002
@@ -1,5 +1,5 @@
<form action="." method="POST"
- tal:define="username python: user.getUserName();
+ tal:define="uid python: user.getId();
versions python: here.portal_staging.getVersionIds(here, 1);
stage python: here.portal_staging.getStageOf(here);
dev_object python:
@@ -8,7 +8,7 @@
locker python: lt and lt.locker(dev_object);"
tal:attributes="action here/absolute_url">
<!--
- allow_submit python: (locker == username) or (
+ allow_submit python: (locker == uid) or (
not locker and versions['dev'] != versions['prod']);
allow_publish allow_submit
-->