[CMF-checkins] CVS: CMF/CMFUid - UniqueIdGeneratorTool.py:1.3 UniqueIdHandlerTool.py:1.3 interfaces.py:1.3

Grégoire Weber zope.org at incept.ch
Tue Jul 20 21:26:11 EDT 2004


Update of /cvs-repository/CMF/CMFUid
In directory cvs.zope.org:/tmp/cvs-serv3535

Modified Files:
	UniqueIdGeneratorTool.py UniqueIdHandlerTool.py interfaces.py 
Log Message:
- changed security settings on 'register', 'unregister', 'UniqueIdGeneratorTool.__call__' to ManagePortal (private before)
- corrected typos


=== CMF/CMFUid/UniqueIdGeneratorTool.py 1.2 => 1.3 ===
--- CMF/CMFUid/UniqueIdGeneratorTool.py:1.2	Tue Jul 20 20:01:45 2004
+++ CMF/CMFUid/UniqueIdGeneratorTool.py	Tue Jul 20 21:26:11 2004
@@ -23,14 +23,15 @@
 
 from BTrees.Length import Length
 
-from OFS.SimpleItem import SimpleItem
-from Products.CMFCore.utils import UniqueObject
-from Products.CMFCore.ActionProviderBase import ActionProviderBase
-
 from Globals import InitializeClass, Persistent
 from AccessControl import ClassSecurityInfo
 from Acquisition import Implicit, aq_base, aq_parent
-from Products.CMFCore.utils import getToolByName
+
+from OFS.SimpleItem import SimpleItem
+
+from Products.CMFCore.utils import getToolByName, UniqueObject
+from Products.CMFCore.ActionProviderBase import ActionProviderBase
+from Products.CMFCore.permissions import ManagePortal
 
 from Products.CMFUid.interfaces \
     import IUniqueIdGenerator, IAnnotatedUniqueId
@@ -148,7 +149,7 @@
         # XXX to be implemented by searching the max value in the catalog
         raise NotImplementedError
     
-    security.declarePrivate('__call__')
+    security.declareProtected(ManagePortal, '__call__')
     def __call__(self):
         """See IUniqueIdGenerator.
         """


=== CMF/CMFUid/UniqueIdHandlerTool.py 1.2 => 1.3 ===
--- CMF/CMFUid/UniqueIdHandlerTool.py:1.2	Tue Jul 20 20:01:45 2004
+++ CMF/CMFUid/UniqueIdHandlerTool.py	Tue Jul 20 21:26:11 2004
@@ -20,14 +20,15 @@
 
 import Missing
 
-from OFS.SimpleItem import SimpleItem
-from Products.CMFCore.utils import UniqueObject
-from Products.CMFCore.ActionProviderBase import ActionProviderBase
-
 from Globals import InitializeClass, Persistent
 from AccessControl import ClassSecurityInfo
 from Acquisition import Implicit, aq_base
-from Products.CMFCore.utils import getToolByName
+
+from OFS.SimpleItem import SimpleItem
+
+from Products.CMFCore.utils import getToolByName, UniqueObject
+from Products.CMFCore.ActionProviderBase import ActionProviderBase
+from Products.CMFCore.permissions import ManagePortal
 
 from Products.CMFUid.interfaces import IUniqueIdHandler
 from Products.CMFUid.interfaces import UniqueIdError
@@ -55,7 +56,7 @@
     
     security = ClassSecurityInfo()
     
-    security.declarePublic('quersUid')
+    security.declarePublic('queryUid')
     def queryUid(self, obj, default=None):
         """See IUniqueIdQuery.
         """
@@ -79,7 +80,7 @@
         return uid
     
     
-    security.declarePrivate('register')
+    security.declareProtected(ManagePortal, 'register')
     def register(self, obj):
         """See IUniqueIdSet.
         """
@@ -99,7 +100,7 @@
             uid = uid()
         return uid
     
-    security.declarePrivate('unregister')
+    security.declareProtected(ManagePortal, 'unregister')
     def unregister(self, obj):
         """See IUniqueIdSet.
         """


=== CMF/CMFUid/interfaces.py 1.2 => 1.3 ===
--- CMF/CMFUid/interfaces.py:1.2	Tue Jul 20 20:01:45 2004
+++ CMF/CMFUid/interfaces.py	Tue Jul 20 21:26:11 2004
@@ -27,6 +27,7 @@
 
 class UniqueIdError(Exception): pass
 
+
 class IUniqueIdQuery(Interface):
     """Querying unique ids.
     """
@@ -105,6 +106,7 @@
         UniqueIdError is raised if object was not registered previously.
         """
 
+
 class IUniqueIdHandler(IUniqueIdSet, IUniqueIdQuery, IUniqueIdBrainQuery):
     """Handle registering, querying unique ids and objects.
     """
@@ -117,6 +119,7 @@
     def __call__():
         """Return a unique id object implementing 'IAnnotatedUid'.
         """
+
 
 class IAnnotatedUniqueId(ICallableOpaqueItem, ICallableOpaqueItemEvents):
     """Unique id handling adding, copying, and deletion events.



More information about the CMF-checkins mailing list