X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/3204e4303148302d278036eebcfc8cb105cc97d7..HEAD:/src/wiki/helpers.py?ds=sidebyside diff --git a/src/wiki/helpers.py b/src/wiki/helpers.py index d62c5459..9b1b3273 100644 --- a/src/wiki/helpers.py +++ b/src/wiki/helpers.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from datetime import datetime from functools import wraps @@ -44,7 +47,7 @@ class JSONServerError(JSONResponse): def ajax_login_required(view): @wraps(view) def authenticated_view(request, *args, **kwargs): - if not request.user.is_authenticated(): + if not request.user.is_authenticated: return http.HttpResponse("Login required.", status=401, content_type="text/plain") return view(request, *args, **kwargs) return authenticated_view