Restored login security to events

This commit is contained in:
David Taylor
2016-10-05 10:42:49 +01:00
parent 17c7a3c524
commit 0244f5cfca
3 changed files with 2 additions and 10 deletions

View File

@@ -1,14 +1,6 @@
{% extends request.is_ajax|yesno:"base_ajax.html,base.html" %}
{% block title %}{% if object.is_rig %}N{{ object.pk|stringformat:"05d" }}{% else %}{{ object.pk }}{% endif %} | {{object.name}}{% endblock %}
{% block extra-head %}
<link rel="alternate" type="application/json+oembed"
href="{{request.scheme}}://{{request.META.HTTP_HOST}}{{event.get_absolute_url}}oembed"
title="RIGS Event Embed" />
{% endblock %}
{% block content %}
<div class="row">
{% if not request.is_ajax %}

View File

@@ -80,7 +80,7 @@ urlpatterns = patterns('',
name='activity_feed'),
url(r'^event/(?P<pk>\d+)/$',
rigboard.EventDetail.as_view(),
permission_required_with_403('RIGS.view_event')(rigboard.EventDetail.as_view()),
name='event_detail'),
url(r'^event/(?P<pk>\d+)/oembed/$',
rigboard.EventOembed.as_view(),

View File

@@ -5,7 +5,7 @@
{% block extra-head %}
{% if next %}
<link rel="alternate" type="application/json+oembed"
href="{{next}}oembed"
href="{{request.scheme}}://{{request.META.HTTP_HOST}}{{next}}oembed"
title="RIGS Event Embed" />
{% endif %}
{% endblock %}