[Zope-Checkins] CVS: Zope2 - PermissionMapping.py:1.9
chrism@serenade.digicool.com
chrism@serenade.digicool.com
Tue, 1 May 2001 14:02:14 -0400
Update of /cvs-repository/Zope2/lib/python/AccessControl
In directory serenade.digicool.com:/home/chrism/sandboxes/PostRegexTrunk/lib/python/AccessControl
Modified Files:
PermissionMapping.py
Log Message:
A better fix to add permissions to RoleManager methods.
--- Updated File PermissionMapping.py in package Zope2 --
--- PermissionMapping.py 2001/05/01 17:15:39 1.8
+++ PermissionMapping.py 2001/05/01 18:02:14 1.9
@@ -92,7 +92,7 @@
import ExtensionClass, Acquisition
from Permission import pname
from Owned import UnownableOwner
-from AccessControl.PermissionRole import PermissionRole
+from Globals import InitializeClass
class RoleManager:
def manage_getPermissionMapping(self):
@@ -119,9 +119,6 @@
a({'permission_name': ac_perms[0], 'class_permission': p})
return r
- manage_getPermissionMapping__roles__=PermissionRole('Change permissions')
-
-
def manage_setPermissionMapping(self,
permission_names=[],
class_permissions=[], REQUEST=None):
@@ -151,8 +148,6 @@
REQUEST,
manage_tabs_message='The permission mapping has been updated')
- manage_setPermissionMapping__roles__=PermissionRole('Change permissions')
-
def _isBeingUsedAsAMethod(self, REQUEST =None, wannaBe=0):
try:
if hasattr(self, 'aq_self'):
@@ -172,7 +167,6 @@
base=getattr(p, 'aq_base', None)
return type(base) is PermissionMapper
-
def getPermissionMapping(name, obj, st=type('')):
obj=getattr(obj, 'aq_base', obj)
@@ -225,3 +219,5 @@
Acquisition.ImplicitAcquisitionWrapper(
w, parent))
return apply(self, args, kw)
+
+InitializeClass(RoleManager)