From ec36d4d64e38159aa3cf5a84656830a860315aae Mon Sep 17 00:00:00 2001 From: Jochen Winzer Date: Wed, 9 Dec 2020 10:36:27 +0100 Subject: [PATCH] User is only allowed to vote if present and has not delegated his vote or has delegated his vote to a user who is present. --- .../components/poll-progress/poll-progress.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/app/site/polls/components/poll-progress/poll-progress.component.ts b/client/src/app/site/polls/components/poll-progress/poll-progress.component.ts index 000370ab1..a82d23a5f 100644 --- a/client/src/app/site/polls/components/poll-progress/poll-progress.component.ts +++ b/client/src/app/site/polls/components/poll-progress/poll-progress.component.ts @@ -41,12 +41,14 @@ export class PollProgressComponent extends BaseViewComponentDirective implements map(users => /** * Filter the users who would be able to vote: - * They are present or have their right to vote delegated + * They are present and don't have their vote right delegated + * or the have their vote delegated to a user who is present. * They are in one of the voting groups */ users.filter( user => - (user.is_present || user.isVoteRightDelegated) && + ((user.is_present && !user.isVoteRightDelegated) || + user.voteDelegatedTo?.is_present) && this.poll.groups_id.intersect(user.groups_id).length ) )