[Zope3-checkins] CVS: Zope3/src/zope/app/component - metadirectives.py:1.16

Stephan Richter srichter at cosmos.phy.tufts.edu
Sat Mar 20 14:53:15 EST 2004


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

Modified Files:
	metadirectives.py 
Log Message:


Updated directives to use Permission field type so that redefining permissions
is possible.




=== Zope3/src/zope/app/component/metadirectives.py 1.15 => 1.16 ===
--- Zope3/src/zope/app/component/metadirectives.py:1.15	Sat Mar 20 12:10:56 2004
+++ Zope3/src/zope/app/component/metadirectives.py	Sat Mar 20 14:52:45 2004
@@ -14,11 +14,11 @@
 """
 $Id$
 """
-
 from zope.interface import Interface
 from zope.configuration.fields import GlobalObject, Tokens, \
      PythonIdentifier, MessageID
 from zope.schema import TextLine, Id
+from zope.app.security.fields import Permission
 
 class IBasicComponentInformation(Interface):
 
@@ -27,7 +27,7 @@
         required=False
         )
 
-    permission = Id(
+    permission = Permission(
         title=u"Permission",
         required=False
         )
@@ -50,7 +50,7 @@
         value_type=GlobalObject(missing_value=object())
         )
 
-    permission = Id(
+    permission = Permission(
         title=u"Permission",
         description=u"The permission needed to use the view.",
         required=False
@@ -165,7 +165,7 @@
         value_type=GlobalObject(missing_value=object())
         )
 
-    permission = Id(
+    permission = Permission(
         title=u"Permission",
         description=u"""This adapter is only available, if the principal has
         this permission.""",
@@ -366,7 +366,7 @@
     given Interface require a given permission for access.
     """
 
-    permission = Id(
+    permission = Permission(
         title=u"Permission",
         description=u"""
         Specifies the permission by id that will be required to




More information about the Zope3-Checkins mailing list