Skip to content

Commit

Permalink
Require staff rights for bulk adding registrations
Browse files Browse the repository at this point in the history
  • Loading branch information
Compizfox committed Nov 26, 2017
1 parent 9b033bc commit 5d99f74
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion app/templates/event_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ <h1><a href="{% url 'event-detail' event.pk %}">{{ event.name }}</a></h1>
</table>
<div class="panel-footer">
<div class="flex-footer">
<a href="{% url 'registration-create' event.pk %}" class="btn btn-primary">{% trans "Inschrijvingen toevoegen" %}</a>
{% if user.is_staff %}
<a href="{% url 'registration-create' event.pk %}" class="btn btn-primary">{% trans "Inschrijvingen toevoegen" %}</a>
{% endif %}
<a href="{% url 'registration-list' event.pk %}?format=csv" class="btn btn-primary" title="{% trans "Alleen ingeschreven deelnemers die niet op de reservelijst staan worden geëxporteerd" %}">{% trans "Exporteren" %}</a>
<a href="{% url 'mail-create' event.pk %}" class="btn btn-primary">{% trans "Mass mail" %}</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions app/views/RegistrationView.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def store(self, request, event):
messages.success(request, _("Commissie {} geregistreerd!").format(committee.name))
return redirect('event-detail', event.pk)
elif request.GET['role'] == 'cm-admin':
# Bulk registration of users as chairman administrating the event
request.user.check_admin_of(event.committee)
# Bulk registration of users as staff administrating the event
request.user.check_staff()

# Create list of tuples from three lists of inputs
rows = list(zip_longest(
Expand Down

0 comments on commit 5d99f74

Please sign in to comment.