[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/dublincore/creatorannotator.py Unwrap ZopeDublinCore adapter in the CreateAnnotator.

Albertas Agejevas alga at pov.lt
Fri Apr 15 10:57:04 EDT 2005


Log message for revision 30001:
  Unwrap ZopeDublinCore adapter in the CreateAnnotator.
  See http://www.zope.org/Collectors/Zope3-dev/373
  

Changed:
  U   Zope3/trunk/src/zope/app/dublincore/creatorannotator.py

-=-
Modified: Zope3/trunk/src/zope/app/dublincore/creatorannotator.py
===================================================================
--- Zope3/trunk/src/zope/app/dublincore/creatorannotator.py	2005-04-15 12:31:58 UTC (rev 30000)
+++ Zope3/trunk/src/zope/app/dublincore/creatorannotator.py	2005-04-15 14:57:03 UTC (rev 30001)
@@ -19,10 +19,14 @@
 
 from zope.app.dublincore.interfaces import IZopeDublinCore
 from zope.security.management import queryInteraction
+from zope.security.proxy import removeSecurityProxy
 
 def CreatorAnnotator(event):
     """Update Dublin-Core creator property"""
     dc = IZopeDublinCore(event.object, None)
+    # Principals that can create object do not necessarily have
+    # 'zope.app.dublincore.change' permission. See issue 373.
+    dc = removeSecurityProxy(dc)
     if dc is None:
         return
 



More information about the Zope3-Checkins mailing list