Commit e298e4e9 authored by Chris McDonough's avatar Chris McDonough

Fix for missing security declarations on setPermissionMapping and getPermissionMapping

parent 299c6e41
...@@ -92,10 +92,9 @@ need the object's ordinary permissions intact so we can manage it. ...@@ -92,10 +92,9 @@ need the object's ordinary permissions intact so we can manage it.
import ExtensionClass, Acquisition import ExtensionClass, Acquisition
from Permission import pname from Permission import pname
from Owned import UnownableOwner from Owned import UnownableOwner
from AccessControl.PermissionRole import PermissionRole
class RoleManager: class RoleManager:
def manage_getPermissionMapping(self): def manage_getPermissionMapping(self):
"""Return the permission mapping for the object """Return the permission mapping for the object
...@@ -119,6 +118,9 @@ class RoleManager: ...@@ -119,6 +118,9 @@ class RoleManager:
p=perms.get(getPermissionMapping(ac_perms[0], wrapper), '') p=perms.get(getPermissionMapping(ac_perms[0], wrapper), '')
a({'permission_name': ac_perms[0], 'class_permission': p}) a({'permission_name': ac_perms[0], 'class_permission': p})
return r return r
manage_getPermissionMapping__roles__=PermissionRole('Change permissions')
def manage_setPermissionMapping(self, def manage_setPermissionMapping(self,
permission_names=[], permission_names=[],
...@@ -149,6 +151,8 @@ class RoleManager: ...@@ -149,6 +151,8 @@ class RoleManager:
REQUEST, REQUEST,
manage_tabs_message='The permission mapping has been updated') manage_tabs_message='The permission mapping has been updated')
manage_setPermissionMapping__roles__=PermissionRole('Change permissions')
def _isBeingUsedAsAMethod(self, REQUEST =None, wannaBe=0): def _isBeingUsedAsAMethod(self, REQUEST =None, wannaBe=0):
try: try:
if hasattr(self, 'aq_self'): if hasattr(self, 'aq_self'):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment