From 510b797f853bb1af476b3da9dd4b1af615c90629 Mon Sep 17 00:00:00 2001
From: Olivier PEREZ <olivier@olivierperez.fr>
Date: Tue, 19 Jan 2016 22:28:34 +0100
Subject: [PATCH] Check if current user is admin BEFORE check
 editedVoteUniqueId

---
 tpl/part/vote_table_classic.tpl | 2 +-
 tpl/part/vote_table_date.tpl    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tpl/part/vote_table_classic.tpl b/tpl/part/vote_table_classic.tpl
index b2979826..e1feac7d 100644
--- a/tpl/part/vote_table_classic.tpl
+++ b/tpl/part/vote_table_classic.tpl
@@ -98,8 +98,8 @@
                     {if $active && !$expired &&
                         (
                          $poll->editable == constant('Framadate\Editable::EDITABLE_BY_ALL')
-                         or ($poll->editable == constant('Framadate\Editable::EDITABLE_BY_OWN') && $editedVoteUniqueId == $vote->uniqId)
                          or $admin
+                         or ($poll->editable == constant('Framadate\Editable::EDITABLE_BY_OWN') && $editedVoteUniqueId == $vote->uniqId)
                         )
                     }
 
diff --git a/tpl/part/vote_table_date.tpl b/tpl/part/vote_table_date.tpl
index 2f5145f5..762f2b71 100644
--- a/tpl/part/vote_table_date.tpl
+++ b/tpl/part/vote_table_date.tpl
@@ -149,8 +149,8 @@
                     {if $active && !$expired &&
                         (
                             $poll->editable == constant('Framadate\Editable::EDITABLE_BY_ALL')
-                            or ($poll->editable == constant('Framadate\Editable::EDITABLE_BY_OWN') && $editedVoteUniqueId == $vote->uniqId)
                             or $admin
+                            or ($poll->editable == constant('Framadate\Editable::EDITABLE_BY_OWN') && $editedVoteUniqueId == $vote->uniqId)
                         )
                     }
                         <td class="hidden-print">
-- 
GitLab