FIX: Require login on events and event embeds again

Little too far to the open side there Arona... Whooooooops!
This commit is contained in:
2020-01-11 20:24:37 +00:00
parent ea12bfa607
commit 0ee393725e
2 changed files with 4 additions and 3 deletions

View File

@@ -36,9 +36,10 @@ class ProfileRegistrationFormUniqueEmail(RegistrationFormUniqueEmail):
class CheckApprovedForm(AuthenticationForm):
def confirm_login_allowed(self, user):
if not user.is_approved and not user.is_superuser:
if user.is_approved or user.is_superuser:
return AuthenticationForm.confirm_login_allowed(self, user)
else:
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)
# Embedded Login form - remove the autofocus