[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security - protectClass.py:1.1.2.14 publicClass.py:1.1.2.10 security-meta.zcml:1.1.2.4 security.zcml:1.1.2.6

Steve Alexander steve@cat-box.net
Sun, 26 May 2002 08:45:27 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/Security
In directory cvs.zope.org:/tmp/cvs-serv17123/lib/python/Zope/App/Security

Modified Files:
      Tag: Zope-3x-branch
	protectClass.py publicClass.py security-meta.zcml 
	security.zcml 
Log Message:
changed "name" attribute of protectClass and publicClass zcml directives
to "class".
Note that I haven't touched the dummy protectClass directive in
Zope/Configuration/tests/... as it is only used as an arbitrary
directive for testing the directive-processing machinery.



=== Zope3/lib/python/Zope/App/Security/protectClass.py 1.1.2.13 => 1.1.2.14 ===
     __class_implements__ = INonEmptyDirective    
     
-    def __init__(self, _context, name, permission_id=None, interface=None,
+    def __init__(self, _context, class_, permission_id=None, interface=None,
                  names=None, like_unto=None):
-        self.__class = _context.resolve(name)
-        self.__name = name
+        self.__class = _context.resolve(class_)
+        self.__name = class_
         self.__permission_id = permission_id
         self.__like_unto = like_unto
         self.__context = _context


=== Zope3/lib/python/Zope/App/Security/publicClass.py 1.1.2.9 => 1.1.2.10 ===
 class publicClass(protectClass):
 
-    def __init__(self, _context, name, permission_id=None, interface=None,
+    def __init__(self, _context, class_, permission_id=None, interface=None,
                  names=None):
         self._getPermission(permission_id) # Prohibit explicit permission!
-        protectClass.__init__(self, _context, name,
+        protectClass.__init__(self, _context, class_,
                               permission_id=PublicPermission,
                               interface=interface, names=names)
 


=== Zope3/lib/python/Zope/App/Security/security-meta.zcml 1.1.2.3 => 1.1.2.4 ===
                handler="Zope.App.Security.metaConfigure.defineRole" />
     <directive name="protectClass"
-               attributes="name, permission_id, interface, methods"
-       handler="Zope.App.Security.protectClass.">
+               attributes="class, permission_id, interface, methods"
+               handler="Zope.App.Security.protectClass.">
       <subdirective name="protect"
                     attributes="permission_id, interface, methods" />
       </directive>
-    <directive name="publicClass" attributes="name, interface, methods"
+    <directive name="publicClass" attributes="class, interface, methods"
                handler="Zope.App.Security.publicClass." />
     <directive name="defaultPolicy" attributes="name"
        handler="Zope.App.Security.metaConfigure.defaultPolicy" />


=== Zope3/lib/python/Zope/App/Security/security.zcml 1.1.2.5 => 1.1.2.6 ===
 <!-- Role-Permission management view -->
   
-<security:protectClass name="Zope.App.Security.RolePermissionView."
+<security:protectClass class="Zope.App.Security.RolePermissionView."
    permission_id="Zope.Security"
    names="index, roles, permissions, permissionRoles, action,
    manage_permissionForm, update_permission,
    manage_roleForm, update_role, permissionForID" />
 
 <security:protectClass
-   name="Zope.App.Security.RolePermissionView.PermissionRoles."
+   class="Zope.App.Security.RolePermissionView.PermissionRoles."
    permission_id="Zope.Security"
    names="roles, rolesInfo"
    interface="Zope.App.Security.IRegisteredObject." />
@@ -53,7 +53,7 @@
 
 <!-- Principal-Permission management view -->
   
-<security:protectClass name="Zope.App.Security.PrincipalPermissionView."
+<security:protectClass class="Zope.App.Security.PrincipalPermissionView."
    permission_id="Zope.Security"
    names="index, get_principal, unsetPermissions, denyPermissions,
    grantPermissions, getUnsetPermissionsForPrincipal,
@@ -65,7 +65,7 @@
               factory="Zope.App.Security.PrincipalPermissionView." />
 
 <!-- protect Roles and Permissions -->
-<security:protectClass name="Zope.App.Security.RoleRegistry.Role"
+<security:protectClass class="Zope.App.Security.RoleRegistry.Role"
                        interface="Zope.App.Security.IRegisteredObject."
                        permission_id="Zope.Public"/>