Skip to content
Snippets Groups Projects
Commit a0347e28 authored by Ben Adida's avatar Ben Adida
Browse files

clarified ability to add new voters on admin side if reg is open

parent 5086256d
No related branches found
No related tags found
No related merge requests found
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<br /> <br />
{% if admin_p and upload_p %} {% if admin_p and upload_p %}
<p> <p>
{% if not election.frozen_at %} {% if election.openreg or not election.frozen_at %}
<a href="{% url helios.views.voters_upload election_uuid=election.uuid %}">bulk upload voters</a> <a href="{% url helios.views.voters_upload election_uuid=election.uuid %}">bulk upload voters</a>
{% endif %} {% endif %}
</p> </p>
......
...@@ -879,7 +879,7 @@ def voters_list_pretty(request, election): ...@@ -879,7 +879,7 @@ def voters_list_pretty(request, election):
'upload_p': helios.VOTERS_UPLOAD, 'q' : q, 'upload_p': helios.VOTERS_UPLOAD, 'q' : q,
'voter_files': voter_files}) 'voter_files': voter_files})
@election_admin(frozen=False) @election_admin()
def voters_upload(request, election): def voters_upload(request, election):
""" """
Upload a CSV of password-based voters with Upload a CSV of password-based voters with
...@@ -887,6 +887,9 @@ def voters_upload(request, election): ...@@ -887,6 +887,9 @@ def voters_upload(request, election):
name and email are needed only if voter_type is static name and email are needed only if voter_type is static
""" """
if election.frozen_at and not election.openreg:
raise PermissionDenied()
if request.method == "GET": if request.method == "GET":
return render_template(request, 'voters_upload', {'election': election}) return render_template(request, 'voters_upload', {'election': election})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment