orga can add talk after the closing of the cfp

This commit is contained in:
Élie Bouttier 2016-10-05 16:43:36 +02:00
parent cef9f7690b
commit e7a1060667
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{% extends 'base.html' %}
{% load i18n %}
{% load accounts_tags i18n %}
{% block participatetab %} class="active"{% endblock %}
@ -19,8 +19,8 @@
{% endif %}
<br />
{% if conf.cfp_is_open %}
<a class="btn btn-success" href="{% url 'add-talk' %}">{% trans "Propose a talk" %}</a>
{% if conf.cfp_is_open or request|orga %}
<a class="btn btn-{% if conf.cfp_is_open %}success{% else %}danger{% endif %}" href="{% url 'add-talk' %}">{% trans "Propose a talk" %}</a>
{% else %}
{% trans "Sorry, the Call for Participation is closed." %}
{% endif %}

View File

@ -145,7 +145,7 @@ def talk_edit(request, talk=None):
raise PermissionDenied()
else: # add new talk
conf = Conference.objects.get(site=site)
if not conf.cfp_is_open():
if not is_orga(request, request.user) and not conf.cfp_is_open():
raise PermissionDenied()
form = TalkForm(request.POST or None, instance=talk, site=site)
if talk: