[Zope-Checkins] CVS: Zope2 - PermissionMapping.py:1.8
chrism@serenade.digicool.com
chrism@serenade.digicool.com
Tue, 1 May 2001 13:15:39 -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:
Fix for missing security declarations on setPermissionMapping and getPermissionMapping
--- Updated File PermissionMapping.py in package Zope2 --
--- PermissionMapping.py 2001/01/29 15:31:28 1.7
+++ PermissionMapping.py 2001/05/01 17:15:39 1.8
@@ -92,10 +92,9 @@
import ExtensionClass, Acquisition
from Permission import pname
from Owned import UnownableOwner
+from AccessControl.PermissionRole import PermissionRole
class RoleManager:
-
-
def manage_getPermissionMapping(self):
"""Return the permission mapping for the object
@@ -119,7 +118,10 @@
p=perms.get(getPermissionMapping(ac_perms[0], wrapper), '')
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):
@@ -148,6 +150,8 @@
return self.manage_access(
REQUEST,
manage_tabs_message='The permission mapping has been updated')
+
+ manage_setPermissionMapping__roles__=PermissionRole('Change permissions')
def _isBeingUsedAsAMethod(self, REQUEST =None, wannaBe=0):
try: