mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 11:59:23 +00:00
Some permissions fixs and security for atomic vote
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{%- if election.can_candidate(user) or user.can_edit(election) %}
|
||||
{%- if (election.can_candidate(user) and election.is_candidature_active) or (user.can_edit(election) and election.is_vote_editable) %}
|
||||
<section class="election__add-candidature">
|
||||
<form action="{{ url('election:candidate', election_id=election.id) }}" method="post">
|
||||
{% csrf_token %}
|
||||
|
@ -359,7 +359,7 @@ th {
|
||||
</section>
|
||||
{%- endif %}
|
||||
<section class="election__add-elements">
|
||||
{%- if election.can_candidate(user) or user.can_edit(election) %}
|
||||
{%- if (election.can_candidate(user) and election.is_candidature_active) or (user.can_edit(election) and election.is_vote_editable) %}
|
||||
<a href="{{ url('election:candidate', election_id=object.id) }}">{% trans %}Candidate{% endtrans %}</a>
|
||||
{%- endif %}
|
||||
<a href="{{ url('election:create_list', election_id=object.id) }}">{% trans %}Add a new list{% endtrans %}</a>
|
||||
|
Reference in New Issue
Block a user