[Zope3-checkins] CVS: Zope3/src/zope/app/securitypolicy - interfaces.py:1.2

Stephan Richter srichter at cosmos.phy.tufts.edu
Fri Mar 5 13:38:05 EST 2004


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

Modified Files:
	interfaces.py 
Log Message:


Removed IRoleService interface and redid the IRole interface to use fields
instead of accessor methods.




=== Zope3/src/zope/app/securitypolicy/interfaces.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/securitypolicy/interfaces.py:1.1	Fri Feb 27 07:46:31 2004
+++ Zope3/src/zope/app/securitypolicy/interfaces.py	Fri Mar  5 13:38:04 2004
@@ -16,7 +16,7 @@
 $Id$
 """
 from zope.interface import Interface
-from zope.app.interfaces.security import IRegisteredObject
+from zope.schema import TextLine, Text
 
 class ISecurityMap(Interface):
     """Security map to hold matrix-like relationships."""
@@ -40,33 +40,24 @@
     def getAllCells():
         " return a list of (rowentry, colentry, value) "
 
-class IRole(IRegisteredObject):
+class IRole(Interface):
     """A role object."""
 
-class IRoleService(Interface):
-    """Define roles
-
-     'IRoleService' objects are used to implement role-definition
-     services. Because they implement services, they are expected to
-     collaborate with services in other contexts. Client code doesn't
-     sarch a context and call multiple services. Instead, client code
-     will call the most specific service in a place and rely on the
-     service to delegate to other services as necessary.
-
-     The interface doesn't include methods for data
-     management. Services may use external data and not allow
-     management in Zope. Simularly, the data to be managed may vary
-     with different implementations of a service.
-     """
-
-    def getRole(rid):
-        """Return an 'IRole' object for the given role id."""
-
-
-    def getRoles():
-        """Return a sequence of the roles (IRole objects)
-        defined in the place containing the service."""
-
+    id = TextLine(
+        title=u"Id",
+        description=u"Id as which this role will be known and used.",
+        readonly=True,
+        required=True)
+
+    title = TextLine(
+        title=u"Title",
+        description=u"Provides a title for the role.",
+        required=True)
+
+    description = Text(
+        title=u"Description",
+        description=u"Provides a description for the role.",
+        required=False)
 
 
 




More information about the Zope3-Checkins mailing list