diff --git a/product/ERP5Type/UnrestrictedMethod.py b/product/ERP5Type/UnrestrictedMethod.py
index c1cf48f7f6a0971045c7566607308209ce8796dc..5a257786dc9b5d7e779d23d06f0a56710e8918a2 100644
--- a/product/ERP5Type/UnrestrictedMethod.py
+++ b/product/ERP5Type/UnrestrictedMethod.py
@@ -30,7 +30,6 @@ from AccessControl.User import UnrestrictedUser
 from AccessControl.SpecialUsers import system
 from AccessControl.SecurityManagement import getSecurityManager, \
         newSecurityManager, setSecurityManager
-from Zope2 import app
 from Products.ERP5Type.Utils import simple_decorator
 
 class PrivilegedUser(UnrestrictedUser):
@@ -86,7 +85,9 @@ def unrestricted_apply(function, args=(), kw={}): # XXX-JPS: naming
         # XXX is it better to get roles from the parent (i.e. portal)?
         uf = user.aq_inner.aq_parent
       except AttributeError:
-        uf = app().acl_users
+        # XXX: local imports are bad, getSite should be moved to ERP5Type.
+        from Products.ERP5.ERP5Site import getSite
+        uf = getSite().acl_users
       role_list = uf.valid_roles()
       if anonymous:
         # If the user is anonymous, use the id of the system user,