mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Superusers bypass approval check
This should fix the remainder of the tests
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user