[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/services - folder.py:1.8

Jim Fulton jim at zope.com
Thu Dec 18 03:00:58 EST 2003


Update of /cvs-repository/Zope3/src/zope/app/interfaces/services
In directory cvs.zope.org:/tmp/cvs-serv12348/src/zope/app/interfaces/services

Modified Files:
	folder.py 
Log Message:
Added a containment constraint so that site-management folders can
only be added to site managers and registration manager containers
(e.g. other site-management folders).


=== Zope3/src/zope/app/interfaces/services/folder.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/interfaces/services/folder.py:1.7	Wed Dec  3 00:41:26 2003
+++ Zope3/src/zope/app/interfaces/services/folder.py	Thu Dec 18 03:00:57 2003
@@ -15,10 +15,11 @@
 
 $Id$
 """
-
 import zope.app.interfaces.services.registration 
 import zope.app.interfaces.container
 import zope.app.interfaces.services.service
+import zope.schema
+from zope.app.container.constraints import ContainerTypesConstraint
 from zope.app.interfaces.services.registration \
      import IRegistrationManagerContainer
 from zope.app.container.constraints import ItemTypePrecondition
@@ -34,6 +35,13 @@
         """
     __setitem__.precondition = ItemTypePrecondition(
         zope.app.interfaces.services.registration.IRegisterable)
+
+    __parent__ = zope.schema.Field(
+        constraint = ContainerTypesConstraint(
+            zope.app.interfaces.services.service.ISiteManager,
+            IRegistrationManagerContainer,
+            ),
+        )
 
 class ISiteManagementFolders(
     zope.app.interfaces.container.IContainer,




More information about the Zope3-Checkins mailing list