[Zope3-checkins] CVS: Zope3/src/zope/app/security/registries - permissionregistry.py:1.3 principalregistry.py:1.6 roleregistry.py:1.3

Guido van Rossum guido@python.org
Mon, 3 Mar 2003 18:16:43 -0500


Update of /cvs-repository/Zope3/src/zope/app/security/registries
In directory cvs.zope.org:/tmp/cvs-serv7820/src/zope/app/security/registries

Modified Files:
	permissionregistry.py principalregistry.py roleregistry.py 
Log Message:
Merge from use-config-branch.  (A joint production by Jim, Tim and Guido.)

- Refactor the service creation and configuration code, making the UI
  for creating and configuring services much more pleasant.

- Add a new marker interface, IUseConfigurable, which is used to say
  that an object records dependencies between it and its
  configurations.  (This applies to other configurable objects besides
  services.)  Another marker interface, IAttributeUseConfigurable,
  says that these dependencies are stored as annotations.  And finally
  IUseConfiguration defines the actual interface for discussing these
  dependencies; implementing IUseConfigurable is a promise that such
  an adapter exists (and implementing IAttributeUseConfigurable is one
  way of making this promise come true :-).

- Add a new view tab for services, called "Configurations", which
  displays links to its configurations with summary information.  (Try
  it for the Events service, which has two configurations by default.)

- Add a new interface, ILocalService, which all local services must
  implement.  Also add ISimpleService, which extends ILocalService
  with IAttributeUseConfigurable.  All existing local service
  implementations implement this.

- Some miscellaneous cleanup (e.g. made the browser namespace the
  default namespace in zope/app/browser/services/configure.zcml).


=== Zope3/src/zope/app/security/registries/permissionregistry.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/security/registries/permissionregistry.py:1.2	Wed Dec 25 09:13:17 2002
+++ Zope3/src/zope/app/security/registries/permissionregistry.py	Mon Mar  3 18:16:12 2003
@@ -23,6 +23,7 @@
 from zope.app.interfaces.security import IPermissionService
 from zope.security.checker import CheckerPublic
 from zope.app.security.exceptions import UndefinedPermissionError
+from zope.app.interfaces.services.interfaces import ISimpleService
 
 
 
@@ -31,7 +32,7 @@
 
 
 class PermissionRegistry(Registry):
-    __implements__ = IPermissionService
+    __implements__ = IPermissionService, ISimpleService
 
     def __init__(self, prefix=PREFIX):
         Registry.__init__(self, Permission)


=== Zope3/src/zope/app/security/registries/principalregistry.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/security/registries/principalregistry.py:1.5	Tue Feb  4 05:40:11 2003
+++ Zope3/src/zope/app/security/registries/principalregistry.py	Mon Mar  3 18:16:12 2003
@@ -22,13 +22,14 @@
 from zope.component import getAdapter, queryAdapter
 from zope.app.interfaces.security import IAuthenticationService, IPrincipal
 from zope.app.interfaces.security import IUnauthenticatedPrincipal
+from zope.app.interfaces.services.interfaces import ISimpleService
 
 class DuplicateLogin(Exception): pass
 class DuplicateId(Exception): pass
 
 class PrincipalRegistry:
 
-    __implements__ = IAuthenticationService
+    __implements__ = IAuthenticationService, ISimpleService
 
     # Methods implementing IAuthenticationService
 


=== Zope3/src/zope/app/security/registries/roleregistry.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/security/registries/roleregistry.py:1.2	Wed Dec 25 09:13:17 2002
+++ Zope3/src/zope/app/security/registries/roleregistry.py	Mon Mar  3 18:16:12 2003
@@ -19,13 +19,14 @@
 from zope.app.security.registries.registry import Registry
 from zope.app.interfaces.security import IRole
 from zope.app.interfaces.security import IRoleService
+from zope.app.interfaces.services.interfaces import ISimpleService
 
 class Role(RegisteredObject):
     __implements__ = IRole
 
 
 class RoleRegistry(Registry):
-    __implements__ = IRoleService
+    __implements__ = IRoleService, ISimpleService
 
     def __init__(self, prefix=PREFIX):
         Registry.__init__(self, Role)