fedora_elections/elections.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 8f1aec4281996acff1794c5835a1ffa803dbf96c
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Fri Aug 1 11:24:27 2014 +0200
Fix check for showing the election announce template
You may be either an election admin or a plain all-mighty admin
Thanks @puiterwijk
diff --git a/fedora_elections/elections.py b/fedora_elections/elections.py
index 70ea77f..4abfbdc 100644
--- a/fedora_elections/elections.py
+++ b/fedora_elections/elections.py
@@ -357,8 +357,8 @@ def election_results_text(election_alias):
if not isinstance(election, models.Election): # pragma: no cover
return election
- if not (is_authenticated() and is_admin(flask.g.fas_user)
- and is_election_admin(flask.g.fas_user, election.id)):
+ if not (is_authenticated() and (is_admin(flask.g.fas_user)
+ or is_election_admin(flask.g.fas_user, election.id))):
flask.flash(
"The text results are only available to the admins",
"error")
return safe_redirect_back()
Show replies by date