Commit 134d8016 authored by Hanno Schlichting's avatar Hanno Schlichting

Seems some of these functions have persistent references to them in a standard...

Seems some of these functions have persistent references to them in a standard install, so we better leave them in place.
parent 3d88647a
...@@ -91,6 +91,19 @@ class RoleManager: ...@@ -91,6 +91,19 @@ class RoleManager:
REQUEST, REQUEST,
manage_tabs_message='The permission mapping has been updated') manage_tabs_message='The permission mapping has been updated')
def _isBeingUsedAsAMethod(self, REQUEST =None, wannaBe=0):
try:
if hasattr(self, 'aq_self'):
r=self.aq_acquire('_isBeingUsedAsAMethod_')
else:
r=self._isBeingUsedAsAMethod_
except: r=0
if REQUEST is not None:
if not r != (not wannaBe): REQUEST.response.notFoundError()
return r
InitializeClass(RoleManager) InitializeClass(RoleManager)
......
...@@ -18,6 +18,7 @@ from cgi import escape ...@@ -18,6 +18,7 @@ from cgi import escape
from Acquisition import Acquired from Acquisition import Acquired
from Acquisition import aq_base from Acquisition import aq_base
from Acquisition import aq_get
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from AccessControl.SecurityManagement import newSecurityManager from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.Permissions import change_permissions from AccessControl.Permissions import change_permissions
...@@ -34,6 +35,12 @@ from AccessControl.requestmethod import requestmethod ...@@ -34,6 +35,12 @@ from AccessControl.requestmethod import requestmethod
DEFAULTMAXLISTUSERS=250 DEFAULTMAXLISTUSERS=250
def _isBeingUsedAsAMethod(self):
return aq_get(self, '_isBeingUsedAsAMethod_', 0)
def _isNotBeingUsedAsAMethod(self):
return not aq_get(self, '_isBeingUsedAsAMethod_', 0)
class RoleManager(Base, RoleManager): class RoleManager(Base, RoleManager):
......
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