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

if logged in as a trustee of an election, allow viewing of the election, fixes #23

parent d0ce5f4f
Branches
No related tags found
No related merge requests found
......@@ -133,6 +133,11 @@ def user_can_see_election(request, election):
if user_can_admin_election(user, election):
return True
# or maybe this is a trustee of the election?
trustee = get_logged_in_trustee(request)
if trustee and trustee.election.uuid == election.uuid:
return True
# then this user has to be a voter
return (get_voter(request, user, election) != None)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment