[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/services - interfaces.py:1.8
Jim Fulton
jim@zope.com
Tue, 21 Jan 2003 16:45:38 -0500
Update of /cvs-repository/Zope3/src/zope/app/interfaces/services
In directory cvs.zope.org:/tmp/cvs-serv13398/interfaces/services
Modified Files:
interfaces.py
Log Message:
Added permission to the schema for TTW view and page configurations.
Updated pages to use the permisssion.
Changed TTW views and pages to use "class" rather than "factory",
where a class is just a mix-in class. It need not provide a standard
__init__ or mix in BrowserView.
Made it possible to change the class.
Removed the presentation type from page configurations. The
persentation type is always IBrowserPresentation.
=== Zope3/src/zope/app/interfaces/services/interfaces.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/interfaces/services/interfaces.py:1.7 Thu Jan 16 06:59:59 2003
+++ Zope3/src/zope/app/interfaces/services/interfaces.py Tue Jan 21 16:45:06 2003
@@ -18,6 +18,7 @@
from zope.app.interfaces.services.configuration import IConfiguration
from zope.app.component.interfacefield import InterfaceField
+from zope.app.security.permission import PermissionField
from zope.schema import BytesLine, TextLine, Text
from zope.interface import Interface
from zope.app.services.field import ComponentPath
@@ -80,13 +81,6 @@
basetype = IPresentation,
)
- factoryName = BytesLine(
- title=u"The dotted name of a factory for creating the view",
- readonly = True,
- required = True,
- min_length = 1,
- )
-
viewName = TextLine(
title = u"View name",
readonly = True,
@@ -103,6 +97,19 @@
default = "default",
)
+ class_ = BytesLine(
+ title=u"View class",
+ required = True,
+ min_length = 1,
+ )
+
+ permission = PermissionField(
+ title=u"Permission",
+ description=u"The permission required to use the view",
+ required = True,
+ )
+
+
class IViewConfiguration(IConfiguration, IViewConfigurationInfo):
def getView(object, request):
@@ -141,9 +148,8 @@
class IPageConfigurationInfo(IViewConfigurationInfo):
- factoryName = BytesLine(
- title=u"The dotted name of a factory for creating the view",
- readonly = True,
+ class_ = BytesLine(
+ title=u"Page class",
required = False,
min_length = 1,
)