[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/services - service.py:1.7

Jim Fulton jim@zope.com
Mon, 3 Feb 2003 12:29:40 -0500


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

Modified Files:
	service.py 
Log Message:

Updated view packages to reflect recent page configuration changes:

- The presentation type is now fixed to IBrowserPresentation.

- Now specify a permission

I also made the contents view conditional on the package being
configured. This makes it easier to remember to do the configuration
before creating pages.

I'll need something similar to prevent adding pages through FTP/PUT.



=== Zope3/src/zope/app/interfaces/services/service.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/interfaces/services/service.py:1.6	Wed Jan  8 12:46:53 2003
+++ Zope3/src/zope/app/interfaces/services/service.py	Mon Feb  3 12:29:07 2003
@@ -22,11 +22,9 @@
 from zope.schema import BytesLine
 from zope.component.interfaces import IPresentation
 from zope.app.interfaces.container import IContainer
-
+from zope.app.security.permission import PermissionField
 from zope.interface import Interface, Attribute
-
 from zope.component.interfaces import IServiceService
-
 from zope.app.interfaces.services.configuration \
      import INamedComponentConfiguration, INameComponentConfigurable
 
@@ -139,14 +137,6 @@
         required = True,
         )
 
-    presentationType = InterfaceField(
-        title = u"Presentation type",
-        description = u"The presentation type of a view",
-        required = True,
-        basetype = IPresentation,
-        default = IBrowserPresentation,
-        )
-
     factoryName = BytesLine(
         title=u"The dotted name of a factory for creating the view",
         required = True,
@@ -158,6 +148,12 @@
         required = False,
         min_length = 1,
         default = "default",
+        )
+
+    permission = PermissionField(
+        title=u"Permission",
+        description=u"The permission required to use the view",
+        required = True,
         )
 
 class IViewPackage(IViewPackageInfo,  IContainer):