]> git.ipfire.org Git - ipfire.org.git/commitdiff
users: Don't show user email addresses to everyone
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 4 Mar 2026 13:24:53 +0000 (13:24 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 4 Mar 2026 13:25:09 +0000 (13:25 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/users/show.html

index 725f439d6e4c78e703e30b1a615df194c93fbd75..2abffc2800abe39d3149e7df7bc2a803876999c7 100644 (file)
        <section class="section">
                <div class="container">
                        <div class="buttons">
-                               <a class="button is-light" href="mailto:{{ account.email }}">
-                                       <span class="icon-text">
-                                               <span class="icon">
-                                                       <i class="fas fa-envelope"></i>
+                               {% if account.can_be_managed_by(current_user) %}
+                                       <a class="button is-light" href="mailto:{{ account.email }}">
+                                               <span class="icon-text">
+                                                       <span class="icon">
+                                                               <i class="fas fa-envelope"></i>
+                                                       </span>
+                                                       <span>{{ account.email }}</span>
                                                </span>
-                                               <span>{{ account.email }}</span>
-                                       </span>
-                               </a>
+                                       </a>
+                               {% end %}
 
                                <a class="button is-light" href="https://community.ipfire.org/u/{{ account.uid }}">
                                        <span class="icon-text">