app/soc/views/helper/decorators.py
changeset 1017 6ad4fdb48840
parent 1007 3b66772d21a5
child 1307 091a21cf3627
--- a/app/soc/views/helper/decorators.py	Tue Jan 27 22:57:19 2009 +0000
+++ b/app/soc/views/helper/decorators.py	Tue Jan 27 22:59:01 2009 +0000
@@ -97,10 +97,16 @@
     check_kwargs = kwargs.copy()
     context = responses.getUniversalContext(request)
 
+    id = context['account']
+    user = context['user']
+
     check_kwargs['GET'] = request.GET
     check_kwargs['POST'] = request.POST
     check_kwargs['context'] = context
 
+    # reset and pre-fill the Checker's cache
+    rights.setCurrentUser(id, user)
+
     # Do the access check dance
     try:
       rights.checkAccess(access_type, check_kwargs)