[CMF-checkins] CVS: CMF/CMFCollector - CollectorIssue.py:1.10

Ken Manheimer klm@zope.com
Wed, 17 Oct 2001 21:52:26 -0400


Update of /cvs-repository/CMF/CMFCollector
In directory cvs.zope.org:/tmp/cvs-serv6551

Modified Files:
	CollectorIssue.py 
Log Message:
A provisional icon, and provisions so anonymous can visit issues.

Icon is a jigsaw piece, to go with the collector's being a bunch.

._add_artifact(): Set the upload so its View permission acquires from
the issue - so the artifacts are visible to visitors if the issue is
visible...


=== CMF/CMFCollector/CollectorIssue.py 1.9 => 1.10 ===
 factory_type_information = (
     {'id': 'Collector Issue',
-#     'content_icon': 'images/puzzlepieceoutline.gif',
+     'content_icon': 'collector_issue_icon.gif',
      'meta_type': 'CMF Collector Issue',
      'description': ('A Collector Issue represents a bug report or'
                      ' other support request.'),
@@ -121,7 +121,7 @@
 
         user = getSecurityManager().getUser()
         if submitter_id is None:
-            self.submitter_id = str(user)
+            submitter_id = str(user)
         self.submitter_id = submitter_id
         if submitter_name is None:
             if hasattr(user, 'full_name'):
@@ -158,7 +158,7 @@
         return self._cook_links(self.get_transcript().CookedBody(stx_level=3))
 
     def _cook_links(self, text, email=0):
-        """Cook text so URLs and artifact references are hrefs.
+        """Cook text so URLs and upload references are hrefs.
 
         If optional arg 'email' is true, then we just provide urls for uploads
         (assuming the email client will take care of linkifying URLs)."""
@@ -399,6 +399,9 @@
         """Add new artifact, and return object."""
         self.invokeFactory(type, id)
         it = self._getOb(id)
+        # Acquire view and access permissions from container
+        it.manage_permission('View', acquire=1)
+        it.manage_permission('Access contents information', acquire=1)
         it.description = description
         it.manage_upload(file)
         return it