From 9023432f5a44eba245acfa02e6a12004c9ef15d8 Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Fri, 14 Feb 2014 12:47:34 +0000 Subject: [PATCH] Revert "Create login_wrapper view" This reverts commit 4f914fdc57a835eb692ebfce5ba22d9f4ed7af20. --- wagtail/wagtailadmin/views/account.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/wagtail/wagtailadmin/views/account.py b/wagtail/wagtailadmin/views/account.py index 7188f37a75..b352d06b31 100644 --- a/wagtail/wagtailadmin/views/account.py +++ b/wagtail/wagtailadmin/views/account.py @@ -2,7 +2,6 @@ from django.conf import settings from django.shortcuts import render, redirect from django.contrib import messages from django.contrib.auth.forms import SetPasswordForm -from django.contrib.auth.views import login def account(request): @@ -32,11 +31,3 @@ def change_password(request): 'form': form, 'can_change_password': can_change_password, }) - -# Wrap login view to prevent logged in users accessing the page -def login_wrapper(request, **kwargs): - if request.user.is_authenticated(): - return redirect(settings.LOGIN_REDIRECT_URL) - else: - return login(request, **kwargs) -