--- a/server/src/metaeducation/auth.py Mon Jul 25 14:15:12 2016 +0200
+++ b/server/src/metaeducation/auth.py Mon Jul 25 15:53:32 2016 +0200
@@ -91,7 +91,7 @@
logger.debug("CLIENT CREDENTIAL AUTH: user %r is authenticated by token %r, auth success", external_id, token)
- if hasattr(request, 'renkan_request_id') and user != getattr(request,'user', None):
+ if hasattr(request, 'renkan_request_id'): # ideally should check if new user is different, but that cause a recursion loop in rest famework (c.f. : rest_framework/request.py", line 193, in user : self._authenticate())) - user != getattr(request,'user', None):
# Re-register the tracking handlers with the new user
logger.debug("CLIENT CREDENTIAL AUTH: Change the registered tracking handlers to user %r", user.external_id)
change_handlers_user(user, request.renkan_request_id)