diff --git a/openslides/assignment/templates/assignment/view.html b/openslides/assignment/templates/assignment/view.html
index b5a886dc4..0d921ad23 100644
--- a/openslides/assignment/templates/assignment/view.html
+++ b/openslides/assignment/templates/assignment/view.html
@@ -125,6 +125,7 @@
{% trans "Candidates" %} |
{% for poll in assignment.poll_set.all %}
+ {% if poll.published and not perms.assignment.can_manage_assignment or perms.assignment.can_manage_assignment %}
{% if perms.assignment.can_manage_assignment %}{% endif %}
{{ forloop.counter }}. {% trans 'ballot' %}
{% if perms.assignment.can_manage_assignment %}
@@ -141,6 +142,7 @@
{% endif %}
|
+ {% endif %}
{% endfor %}
{% if assignment.profile.count > 0 and perms.assignment.can_manage_assignment and assignment.status == "vot" %}
@@ -192,7 +194,9 @@
|
{%trans 'Invalid votes' %} |
{% for p in polls %}
+ {% if p.published and not perms.assignment.can_manage_assignment or perms.assignment.can_manage_assignment %}
{{ p.votesinvalid }} |
+ {% endif %}
{% endfor %}
{% if assignment.profile.count > 0 and perms.assignment.can_manage_assignment and assignment.status == "vot" %}
|
@@ -201,7 +205,9 @@
{%trans 'Votes cast' %} |
{% for p in polls %}
+ {% if p.published and not perms.assignment.can_manage_assignment or perms.assignment.can_manage_assignment %}
{{ p.votescast }} |
+ {% endif %}
{% endfor %}
{% if assignment.profile.count > 0 and perms.assignment.can_manage_assignment and assignment.status == "vot" %}
|
diff --git a/openslides/assignment/views.py b/openslides/assignment/views.py
index 21cb01467..4e64fd4ff 100644
--- a/openslides/assignment/views.py
+++ b/openslides/assignment/views.py
@@ -69,14 +69,15 @@ def view(request, assignment_id=None):
for candidate in assignment.candidates:
tmplist = [[candidate, assignment.is_elected(candidate)], []]
for poll in assignment.poll_set.all():
- if candidate in poll.options_values:
- option = Option.objects.filter(poll=poll).filter(user=candidate)[0]
- if poll.optiondecision:
- tmplist[1].append([option.yes, option.no, option.undesided])
+ if (poll.published and not request.user.has_perm('assignment.can_manage_assignment')) or request.user.has_perm('assignment.can_manage_assignment'):
+ if candidate in poll.options_values:
+ option = Option.objects.filter(poll=poll).filter(user=candidate)[0]
+ if poll.optiondecision:
+ tmplist[1].append([option.yes, option.no, option.undesided])
+ else:
+ tmplist[1].append(option.yes)
else:
- tmplist[1].append(option.yes)
- else:
- tmplist[1].append("-")
+ tmplist[1].append("-")
votes.append(tmplist)
polls = []