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

View File

@@ -87,7 +87,7 @@ urlpatterns = [
login_required()(versioning.ActivityFeed.as_view()),
name='activity_feed'),
url(r'^event/(?P<pk>\d+)/$', (
url(r'^event/(?P<pk>\d+)/$', permission_required_with_403('', oembed_view="event_oembed")(
rigboard.EventDetail.as_view()),
name='event_detail'),
url(r'^event/(?P<pk>\d+)/embed/$',