[Zope3-checkins] CVS: Zope3/src/zope/app/dublincore - annotatableadapter.py:1.9 creatorannotator.py:1.9

Stephan Richter srichter at cosmos.phy.tufts.edu
Mon Mar 8 07:07:05 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/dublincore
In directory cvs.zope.org:/tmp/cvs-serv13053/src/zope/app/dublincore

Modified Files:
	annotatableadapter.py creatorannotator.py 
Log Message:


Adjusted code to use the new APIs for permissions and principals. Also, use
the utility service instead of the permission registry to look up permissions.




=== Zope3/src/zope/app/dublincore/annotatableadapter.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/dublincore/annotatableadapter.py:1.8	Sat Mar  6 11:50:21 2004
+++ Zope3/src/zope/app/dublincore/annotatableadapter.py	Mon Mar  8 07:05:56 2004
@@ -20,8 +20,7 @@
 from zope.fssync.server.entryadapter import ObjectEntryAdapter
 from zope.fssync.server.interfaces import IObjectFile
 from zope.interface import implements
-from zope.app.interfaces.annotation import IAnnotations
-from zope.app.interfaces.annotation import IAnnotatable
+from zope.app.interfaces.annotation import IAnnotations, IAnnotatable
 from zope.app.dublincore.zopedublincore import ZopeDublinCore
 from zope.xmlpickle import dumps, loads
 from persistent.dict import PersistentDict


=== Zope3/src/zope/app/dublincore/creatorannotator.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/dublincore/creatorannotator.py:1.8	Sat Mar  6 12:48:48 2004
+++ Zope3/src/zope/app/dublincore/creatorannotator.py	Mon Mar  8 07:05:56 2004
@@ -15,16 +15,13 @@
 
 $Id$
 """
-__metaclass__ = type
-
 from zope.app.dublincore.interfaces import IZopeDublinCore
 from zope.app.event.interfaces import ISubscriber
 from zope.security.management import getSecurityManager
 from zope.interface import implements
 
-class CreatorAnnotatorClass:
-    """Update Dublin-Core creator property
-    """
+class CreatorAnnotatorClass(object):
+    """Update Dublin-Core creator property"""
     implements(ISubscriber)
 
     def notify(self, event):
@@ -38,7 +35,7 @@
         principal = getSecurityManager().getPrincipal()
         if principal is None:
             return
-        principalid = principal.getId()
+        principalid = principal.id
         if not principalid in dc.creators:
             dc.creators = dc.creators + (unicode(principalid), )
 




More information about the Zope3-Checkins mailing list