mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-28 02:42:17 +00:00
FIX: Require login on events and event embeds again
Little too far to the open side there Arona... Whooooooops!
This commit is contained in:
@@ -36,9 +36,10 @@ class ProfileRegistrationFormUniqueEmail(RegistrationFormUniqueEmail):
|
|||||||
|
|
||||||
class CheckApprovedForm(AuthenticationForm):
|
class CheckApprovedForm(AuthenticationForm):
|
||||||
def confirm_login_allowed(self, user):
|
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!")
|
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
|
# Embedded Login form - remove the autofocus
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ urlpatterns = [
|
|||||||
login_required()(versioning.ActivityFeed.as_view()),
|
login_required()(versioning.ActivityFeed.as_view()),
|
||||||
name='activity_feed'),
|
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()),
|
rigboard.EventDetail.as_view()),
|
||||||
name='event_detail'),
|
name='event_detail'),
|
||||||
url(r'^event/(?P<pk>\d+)/embed/$',
|
url(r'^event/(?P<pk>\d+)/embed/$',
|
||||||
|
|||||||
Reference in New Issue
Block a user