From 4d722fd5cb141c0ffeb88426a2bcbf49acadb007 Mon Sep 17 00:00:00 2001 From: FreneticScribbler Date: Sat, 11 Jan 2020 19:15:02 +0000 Subject: [PATCH] Superusers bypass approval check This should fix the remainder of the tests --- RIGS/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RIGS/forms.py b/RIGS/forms.py index 6846a9cb..55b11632 100644 --- a/RIGS/forms.py +++ b/RIGS/forms.py @@ -57,7 +57,7 @@ class ProfileChangeForm(UserChangeForm): class CheckApprovedForm(AuthenticationForm): def confirm_login_allowed(self, user): - if not user.is_approved: + if not user.is_approved and not user.is_superuser: raise forms.ValidationError("Your account hasn't been approved by an administrator yet. Please check back in a few minutes!") return AuthenticationForm.confirm_login_allowed(self, user)