diff options
| author | Magnus Hagander | 2020-04-01 18:43:26 +0000 |
|---|---|---|
| committer | Magnus Hagander | 2020-04-01 18:43:26 +0000 |
| commit | 0e8e6464f66fe8940f18c75f65ec0104f2f7fca4 (patch) | |
| tree | fea849346f21829e97b8182300da41988ca9120c /django/archives | |
| parent | 2dc039db5a99b68777e5e27d3f912a9ddaf59a24 (diff) | |
is_authenticated is no longer a callable in newer Django
Diffstat (limited to 'django/archives')
| -rw-r--r-- | django/archives/auth.py | 2 | ||||
| -rw-r--r-- | django/archives/mailarchives/views.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/django/archives/auth.py b/django/archives/auth.py index 4ae553b..87ffb0b 100644 --- a/django/archives/auth.py +++ b/django/archives/auth.py @@ -72,7 +72,7 @@ def login(request): # Handle logout requests by logging out of this site and then # redirecting to log out from the main site as well. def logout(request): - if request.user.is_authenticated(): + if request.user.is_authenticated: django_logout(request) return HttpResponseRedirect("%slogout/" % settings.PGAUTH_REDIRECT) diff --git a/django/archives/mailarchives/views.py b/django/archives/mailarchives/views.py index 5e01aa3..4a5729c 100644 --- a/django/archives/mailarchives/views.py +++ b/django/archives/mailarchives/views.py @@ -31,7 +31,7 @@ from .models import * def ensure_logged_in(request): if settings.PUBLIC_ARCHIVES: return - if hasattr(request, 'user') and request.user.is_authenticated(): + if hasattr(request, 'user') and request.user.is_authenticated: return raise ERedirect('%s?next=%s' % (settings.LOGIN_URL, request.path)) @@ -41,7 +41,7 @@ def ensure_logged_in(request): def ensure_list_permissions(request, l): if settings.PUBLIC_ARCHIVES: return - if hasattr(request, 'user') and request.user.is_authenticated(): + if hasattr(request, 'user') and request.user.is_authenticated: if request.user.is_superuser: return if l.subscriber_access and ListSubscriber.objects.filter(list=l, username=request.user.username).exists(): @@ -59,7 +59,7 @@ def ensure_list_permissions(request, l): def ensure_message_permissions(request, msgid): if settings.PUBLIC_ARCHIVES: return - if hasattr(request, 'user') and request.user.is_authenticated(): + if hasattr(request, 'user') and request.user.is_authenticated: if request.user.is_superuser: return @@ -635,7 +635,7 @@ def resend(request, messageid): if not settings.ALLOW_RESEND: raise PermissionDenied("Access denied.") - if not (hasattr(request, 'user') and request.user.is_authenticated()): + if not (hasattr(request, 'user') and request.user.is_authenticated): raise ERedirect('%s?next=%s' % (settings.LOGIN_URL, request.path)) ensure_message_permissions(request, messageid) |
