[Python-checkins] r88799 - in tracker/instances/python-dev: extensions/pydevutils.py extensions/suppress_history.py html/user.item.html
martin.v.loewis
python-checkins at python.org
Thu Mar 24 09:06:01 CET 2011
Author: martin.v.loewis
Date: Thu Mar 24 09:06:00 2011
New Revision: 88799
Log:
Display contrib_form_date unconditionally to coordinators.
Added:
tracker/instances/python-dev/extensions/pydevutils.py
- copied, changed from r88785, /tracker/instances/python-dev/extensions/suppress_history.py
Removed:
tracker/instances/python-dev/extensions/suppress_history.py
Modified:
tracker/instances/python-dev/html/user.item.html
Copied: tracker/instances/python-dev/extensions/pydevutils.py (from r88785, /tracker/instances/python-dev/extensions/suppress_history.py)
==============================================================================
--- /tracker/instances/python-dev/extensions/suppress_history.py (original)
+++ tracker/instances/python-dev/extensions/pydevutils.py Thu Mar 24 09:06:00 2011
@@ -9,5 +9,11 @@
# currently not used
return True
+def is_coordinator(request):
+ user = request.client.userid
+ db = request.client.db
+ return 'Coordinator' in db.user.get(user, 'roles')
+
def init(instance):
instance.registerUtil('is_history_ok', is_history_ok)
+ instance.registerUtil('is_coordinator', is_coordinator)
Deleted: tracker/instances/python-dev/extensions/suppress_history.py
==============================================================================
--- tracker/instances/python-dev/extensions/suppress_history.py Thu Mar 24 09:06:00 2011
+++ (empty file)
@@ -1,13 +0,0 @@
-def is_history_ok(request):
- user = request.client.userid
- db = request.client.db
- classname = request.classname
- nodeid = request.nodeid
- # restrict display of user history to user itself only
- if classname == 'user':
- return user == nodeid or 'Coordinator' in db.user.get(user, 'roles')
- # currently not used
- return True
-
-def init(instance):
- instance.registerUtil('is_history_ok', is_history_ok)
Modified: tracker/instances/python-dev/html/user.item.html
==============================================================================
--- tracker/instances/python-dev/html/user.item.html (original)
+++ tracker/instances/python-dev/html/user.item.html Thu Mar 24 09:06:00 2011
@@ -110,7 +110,7 @@
<tr>
<th>Contributor Form Received</th>
<td><span tal:replace="structure context/contrib_form/field"/>
- <tal:if condition="context/contrib_form">
+ <tal:if condition="python:context.contrib_form or utils.is_coordinator(request)">
on: <span tal:replace="structure context/contrib_form_date/field"/>
</tal:if>
</td>
More information about the Python-checkins
mailing list