fedora_elections/elections.py | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
New commits:
commit cbad3d6573394df0b9c85e619956e6ab464db6b7
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Fri Jul 25 15:36:36 2014 +0200
Let's make it simple: only admins can see the text version of the results page
diff --git a/fedora_elections/elections.py b/fedora_elections/elections.py
index 30a7c8f..a4ca812 100644
--- a/fedora_elections/elections.py
+++ b/fedora_elections/elections.py
@@ -364,12 +364,10 @@ def election_results_text(election_alias):
if not isinstance(election, models.Election): # pragma: no cover
return election
- elif election.embargoed and (
- not is_admin(flask.g.fas_user)
- or not is_election_admin(flask.g.fas_user, election.id)):
+ if not is_authenticated() or not is_admin(flask.g.fas_user) \
+ or not is_election_admin(flask.g.fas_user, election.id):
flask.flash(
- "The text results are only available to admins when the election"
- " is under embargo")
+ "The text results are only available to the admins",
"error")
return safe_redirect_back()
usernamemap = {}
Show replies by date