[CMF-checkins] CVS: CMF/CMFCollector - CollectorIssue.py:1.3
Ken Manheimer
klm@zope.com
Thu, 11 Oct 2001 20:31:42 -0400
Update of /cvs-repository/CMF/CMFCollector
In directory cvs.zope.org:/tmp/cvs-serv21394
Modified Files:
CollectorIssue.py
Log Message:
.is_assigned(): Whoops - didn't mean to delete this last time, it's
necessary...
Reduce some superfluous whitespace...
=== CMF/CMFCollector/CollectorIssue.py 1.2 => 1.3 ===
transcript = self.get_transcript()
self.comment_number = self.comment_number + 1
- entry_leader = "\n\n" + self._entry_header(action, username) + "\n\n"
+ entry_leader = "\n" + self._entry_header(action, username) + "\n"
transcript._edit('stx',
transcript.EditableBody()
+ entry_leader
@@ -226,6 +226,12 @@
wftool = getToolByName(self, 'portal_workflow')
return wftool.getInfoFor(self, 'assigned_to', [])
+ security.declareProtected(CMFCorePermissions.View, 'is_assigned')
+ def is_assigned(self):
+ """True iff the current user is among .assigned_to()."""
+ username = str(getSecurityManager().getUser())
+ return username in self.assigned_to()
+
security.declareProtected(CMFCorePermissions.View, 'status')
def status(self):
"""Return the current status according to workflow."""
@@ -243,7 +249,7 @@
user = getSecurityManager().getUser()
entry_leader = ("\n\n"
+ self._entry_header("New Artifact '%s'" % id, user)
- + "\n\n")
+ + "\n")
transcript._edit('stx',
transcript.EditableBody()
+ entry_leader