From a8b6ff20c1c9756181a91e0bff303eaea5706769 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 7 May 2019 17:58:31 +0100 Subject: [PATCH] people: Do not show any personal information to users without status Signed-off-by: Michael Tremer --- src/templates/people/user.html | 106 +++++++++++++++++---------------- 1 file changed, 54 insertions(+), 52 deletions(-) diff --git a/src/templates/people/user.html b/src/templates/people/user.html index a1b5a3d1..45bddc26 100644 --- a/src/templates/people/user.html +++ b/src/templates/people/user.html @@ -13,68 +13,70 @@ -
- {% if account.address %} -
-
{{ _("Postal Address") }}
+ {% if current_user == account or current_user.is_staff() %} +
+ {% if account.address %} +
+
{{ _("Postal Address") }}
-
- {{ account.name }} -
- {% for line in account.address %} - {{ line }}
- {% end %} -
-
- {% end %} +
+ {{ account.name }} +
+ {% for line in account.address %} + {{ line }}
+ {% end %} +
+
+ {% end %} -
- {% if account.phone_number or account.fax_number %} -
{{ _("Phone Numbers") }}
+
+ {% if account.phone_number or account.fax_number %} +
{{ _("Phone Numbers") }}
- + {% end %} - {% if account.phone_numbers %} -
{{ _("External Phone Numbers") }}
+ {% if account.phone_numbers %} +
{{ _("External Phone Numbers") }}
-
    - {% for number in account.phone_numbers %} -
  • - {% if phonenumbers.number_type(number) == phonenumbers.PhoneNumberType.MOBILE %} - - {% else %} - - {% end %} +
      + {% for number in account.phone_numbers %} +
    • + {% if phonenumbers.number_type(number) == phonenumbers.PhoneNumberType.MOBILE %} + + {% else %} + + {% end %} - {{ format_phone_number(number) }} -
    • - {% end %} -
    - {% end %} + {{ format_phone_number(number) }} +
  • + {% end %} +
+ {% end %} +
-
+ {% end %}
{% end block %} -- 2.39.2