]> git.agnieray.net Git - galette.git/commitdiff
Resctict edit button to authorized users
authorJohan Cwiklinski <johan@x-tnd.be>
Sun, 14 Nov 2021 17:35:29 +0000 (18:35 +0100)
committerJohan Cwiklinski <johan@x-tnd.be>
Sun, 14 Nov 2021 17:53:35 +0000 (18:53 +0100)
Fix call to plugins getDashboard

galette/templates/default/desktop.tpl
galette/templates/default/gestion_adherents.tpl
galette/templates/default/voir_adherent.tpl

index 4bf7f1032a6380eb2f6cf6f2787391e48c132eba..f1fd475e45b0bda088355d49f7dc25b7685a0768 100644 (file)
@@ -38,9 +38,9 @@
     {if $login->isAdmin()}
                 <a id="prefs" href="{path_for name="preferences"}" title="{_T string="Set applications preferences (address, website, member's cards configuration, ...)"}">{_T string="Settings"}</a>
                 <a id="plugins" href="{path_for name="plugins"}" title="{_T string="Information about available plugins"}">{_T string="Plugins"}</a>
+    {/if}
                 {* Include plugins user dashboard *}
                 {$plugins->getDashboard($tpl)}
-    {/if}
 {else}
                 {* Single member *}
                 <a id="members" href="{path_for name="me"}" title="{_T string="View my member card"}">{_T string="My information"}</a>
index 7d67ccc136611c4650c14f09ab1b344cc7e8e65c..92c9a99b126dae20c09f136e3674d25526db5121 100644 (file)
@@ -3,6 +3,7 @@
 
 {function name=draw_actions}
                     <td class="{$rclass} center nowrap actions_row">
+{if $member->canEdit($login)}
                         <a
                             href="{path_for name="editMember" data=["id" => $member->id]}"
                             class="tooltip action"
@@ -10,6 +11,7 @@
                             <i class="fas fa-user-edit fa-fw" aria-hidden="true"></i>
                             <span class="sr-only">{_T string="%membername: edit information" pattern="/%membername/" replace=$member->sname}</span>
                         </a>
+{/if}
 {if $login->isAdmin() or $login->isStaff()}
                         <a
                             href="{path_for name="contributions" data=["type" => "contributions", "option" => "member", "value" => $member->id]}"
index 473ed32e403cad817923253155e4dbf0015c9134..8d32615832c0252ac41e00d2be41b637307e7f83 100644 (file)
@@ -51,6 +51,7 @@
             </li>
     {/if}
 {/if}
+{if $member->canEdit($login)}
             <li>
                 <a
                     href="{path_for name="editMember" data=["id" => $member->id]}"
@@ -61,6 +62,7 @@
                     {_T string="Modification"}
                 </a>
             </li>
+{/if}
 {if $login->isAdmin() or $login->isStaff() || $login->id eq $member->id || ($member->hasParent() and $member->parent->id eq $login->id)}
             <li>
                 <a