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

allowed for removal of Helios trustee

parent 3d1a6570
Branches
No related tags found
No related merge requests found
...@@ -27,7 +27,9 @@ ...@@ -27,7 +27,9 @@
{% for t in trustees %} {% for t in trustees %}
<h3> Trustee #{{forloop.counter}}: {{t.name}} <h3> Trustee #{{forloop.counter}}: {{t.name}}
{% if admin_p %} {% if admin_p %}
{% if not t.secret_key %} {% if t.secret_key %}
{% if not election.frozen_at %}[<a onclick="return confirm('Are you sure you want to remove Helios as a trustee?');" href="{% url helios.views.delete_trustee election.uuid %}?uuid={{t.uuid}}">x</a>]{% endif %}
{% else %}
({{t.email}}) ({{t.email}})
{% if not election.frozen_at %}[<a onclick="return confirm('Are you sure you want to remove this Trustee?');" href="{% url helios.views.delete_trustee election.uuid %}?uuid={{t.uuid}}">x</a>]{% endif %} {% if not election.frozen_at %}[<a onclick="return confirm('Are you sure you want to remove this Trustee?');" href="{% url helios.views.delete_trustee election.uuid %}?uuid={{t.uuid}}">x</a>]{% endif %}
[<a onclick="return confirm('Are you sure you want to send this trustee his/her admin URL?');" href="{% url helios.views.trustee_send_url election.uuid t.uuid %}">send login</a>] [<a onclick="return confirm('Are you sure you want to send this trustee his/her admin URL?');" href="{% url helios.views.trustee_send_url election.uuid t.uuid %}">send login</a>]
......
...@@ -326,7 +326,7 @@ def new_trustee_helios(request, election): ...@@ -326,7 +326,7 @@ def new_trustee_helios(request, election):
election.generate_trustee(ELGAMAL_PARAMS) election.generate_trustee(ELGAMAL_PARAMS)
return HttpResponseRedirect(reverse(list_trustees_view, args=[election.uuid])) return HttpResponseRedirect(reverse(list_trustees_view, args=[election.uuid]))
@election_admin() @election_admin(frozen=False)
def delete_trustee(request, election): def delete_trustee(request, election):
trustee = Trustee.get_by_election_and_uuid(election, request.GET['uuid']) trustee = Trustee.get_by_election_and_uuid(election, request.GET['uuid'])
trustee.delete() trustee.delete()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment