Enhance user authentication check to exclude XHR requests in ViewAuth

1 parent 94c4c3ba
...@@ -196,7 +196,7 @@ class ViewAuth(BaseView): ...@@ -196,7 +196,7 @@ class ViewAuth(BaseView):
if not next_url: if not next_url:
next_url = request.home next_url = request.home
if request.authenticated_userid: # (request): if request.authenticated_userid and not request.is_xhr: # (request):
message = 'Anda sudah login' message = 'Anda sudah login'
if request.is_xhr: if request.is_xhr:
user = request.user user = request.user
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!