From 391f3bde8fc06be67c35a57b5e5ab31c2f9709d3 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO <ynerant@crans.org> Date: Mon, 6 Sep 2021 11:56:56 +0200 Subject: [PATCH] Fix permission to see note balance when we can't see profile detail (e.g. for note account) Signed-off-by: Yohann D'ANELLO <ynerant@crans.org> --- .../member/templates/member/includes/profile_info.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/member/templates/member/includes/profile_info.html b/apps/member/templates/member/includes/profile_info.html index e1941d23..378d54e2 100644 --- a/apps/member/templates/member/includes/profile_info.html +++ b/apps/member/templates/member/includes/profile_info.html @@ -39,13 +39,13 @@ <dt class="col-xl-6">{% trans 'address'|capfirst %}</dt> <dd class="col-xl-6">{{ user_object.profile.address }}</dd> - {% if user_object.note and "note.view_note"|has_perm:user_object.note %} - <dt class="col-xl-6">{% trans 'balance'|capfirst %}</dt> - <dd class="col-xl-6">{{ user_object.note.balance | pretty_money }}</dd> - <dt class="col-xl-6">{% trans 'paid'|capfirst %}</dt> <dd class="col-xl-6">{{ user_object.profile.paid|yesno }}</dd> - {% endif %} + {% endif %} + + {% if user_object.note and "note.view_note"|has_perm:user_object.note %} + <dt class="col-xl-6">{% trans 'balance'|capfirst %}</dt> + <dd class="col-xl-6">{{ user_object.note.balance | pretty_money }}</dd> {% endif %} </dl> -- GitLab