diff --git a/product/ERP5Type/Base.py b/product/ERP5Type/Base.py
index ad597d8de47ec8133150cd7e4a9e585a23b9bc12..7d9cf8b751b0617013f1b03abde8762e2a0afdaf 100644
--- a/product/ERP5Type/Base.py
+++ b/product/ERP5Type/Base.py
@@ -79,7 +79,6 @@ from Products.CMFActivity.ActiveObject import ActiveObject
 from Products.ERP5Type.Accessor.Accessor import Accessor as Method
 from Products.ERP5Type.Accessor.TypeDefinition import asDate
 from Products.ERP5Type.Message import Message
-from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
 
 from zope.interface import classImplementsOnly, implementedBy
 
diff --git a/product/ERP5Type/ERP5Type.py b/product/ERP5Type/ERP5Type.py
index aa085f35c679d868779b941d737e2fdd90dc2622..c4d117dc94633e2cc972cba909247c08d712d788 100644
--- a/product/ERP5Type/ERP5Type.py
+++ b/product/ERP5Type/ERP5Type.py
@@ -55,10 +55,8 @@ class LocalRoleAssignorMixIn(object):
     zope.interface.implements(interfaces.ILocalRoleAssignor)
 
     security.declarePrivate('updateLocalRolesOnObject')
-    def updateLocalRolesOnDocument(self, *args, **kw):
-      return UnrestrictedMethod(self._updateLocalRolesOnDocument)(*args, **kw)
-
-    def _updateLocalRolesOnDocument(self, ob, user_name=None, reindex=True):
+    @UnrestrictedMethod
+    def updateLocalRolesOnDocument(self, ob, user_name=None, reindex=True):
       """
         Assign Local Roles to Groups on object 'ob', based on Portal Type Role
         Definitions and "ERP5 Role Definition" objects contained inside 'ob'.
diff --git a/product/ERP5Type/UnrestrictedMethod.py b/product/ERP5Type/UnrestrictedMethod.py
index c0f31921532a69a4110948373fefef9c0d65b6b5..154e673adbd27bf8ee687609c149bee4a299ab19 100644
--- a/product/ERP5Type/UnrestrictedMethod.py
+++ b/product/ERP5Type/UnrestrictedMethod.py
@@ -48,13 +48,13 @@ class PrivilegedUser(UnrestrictedUser):
     """Get the ID of the user. This is disabled in UnrestrictedUser."""
     return self.getUserName()
 
-class UnrestrictedMethod(object):
-  """Callable object that bypasses all security checks.
+def UnrestrictedMethod(function):
+  """Decorator to bypass all security checks.
 
   This method is dangerous. Never use this, until you are 100% certain
   that you have no other way.
 
-  When a method is wrapped with an instance of this class, it will behave
+  When a function is wrapped with this decorator, it will behave
   in the same way as before, besides that all security checks pass through.
   This is required, for example, for the simulation to expand movements,
   regardless of the permissions given to a user.
@@ -66,10 +66,9 @@ class UnrestrictedMethod(object):
 
   This method is dangerous. Enough said. Be careful.
   """
-  def __init__(self, method):
-    self._m = method
+  return lambda *args, **kw: _unrestricted_apply(function, args, kw)
 
-  def __call__(self, *args, **kw):
+def _unrestricted_apply(function, args, kw):
     security_manager = getSecurityManager()
     user = security_manager.getUser()
     anonymous = (user.getUserName() == 'Anonymous User')
@@ -94,8 +93,7 @@ class UnrestrictedMethod(object):
                                   role_list, user.getDomains()).__of__(uf)
     newSecurityManager(None, super_user)
     try:
-      return self._m(*args, **kw)
+      return apply(function, args, kw)
     finally:
       # Make sure that the original user is back.
       setSecurityManager(security_manager)
-