From: Johan Cwiklinski Date: Sun, 14 Nov 2021 17:35:29 +0000 (+0100) Subject: Resctict edit button to authorized users X-Git-Tag: 0.9.6~49 X-Git-Url: https://git.agnieray.net/?a=commitdiff_plain;h=da064a0371a46a1cfdbbc7df905376f9b435f8d2;p=galette.git Resctict edit button to authorized users Fix call to plugins getDashboard --- diff --git a/galette/templates/default/desktop.tpl b/galette/templates/default/desktop.tpl index 4bf7f1032..f1fd475e4 100644 --- a/galette/templates/default/desktop.tpl +++ b/galette/templates/default/desktop.tpl @@ -38,9 +38,9 @@ {if $login->isAdmin()} {_T string="Settings"} {_T string="Plugins"} + {/if} {* Include plugins user dashboard *} {$plugins->getDashboard($tpl)} - {/if} {else} {* Single member *} {_T string="My information"} diff --git a/galette/templates/default/gestion_adherents.tpl b/galette/templates/default/gestion_adherents.tpl index 7d67ccc13..92c9a99b1 100644 --- a/galette/templates/default/gestion_adherents.tpl +++ b/galette/templates/default/gestion_adherents.tpl @@ -3,6 +3,7 @@ {function name=draw_actions} +{if $member->canEdit($login)} $member->id]}" class="tooltip action" @@ -10,6 +11,7 @@ {_T string="%membername: edit information" pattern="/%membername/" replace=$member->sname} +{/if} {if $login->isAdmin() or $login->isStaff()} "contributions", "option" => "member", "value" => $member->id]}" diff --git a/galette/templates/default/voir_adherent.tpl b/galette/templates/default/voir_adherent.tpl index 473ed32e4..8d3261583 100644 --- a/galette/templates/default/voir_adherent.tpl +++ b/galette/templates/default/voir_adherent.tpl @@ -51,6 +51,7 @@ {/if} {/if} +{if $member->canEdit($login)}
  • $member->id]}" @@ -61,6 +62,7 @@ {_T string="Modification"}
  • +{/if} {if $login->isAdmin() or $login->isStaff() || $login->id eq $member->id || ($member->hasParent() and $member->parent->id eq $login->id)}