From: Michael Tremer Date: Tue, 7 May 2019 16:58:31 +0000 (+0100) Subject: people: Do not show any personal information to users without status X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a8b6ff20c1c9756181a91e0bff303eaea5706769;p=ipfire.org.git people: Do not show any personal information to users without status Signed-off-by: Michael Tremer --- 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 %}