From 5ef23d60bebf3398940edfe6f54cc9ada5d5bb72 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 7 Apr 2024 20:31:54 -0400 Subject: [PATCH] show admin/staff permission --- common/templates/_sidebar.html | 4 ++- users/templates/users/profile_actions.html | 33 ++++++++++++++++------ 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/common/templates/_sidebar.html b/common/templates/_sidebar.html index 89bbb8f0..c7b3682c 100644 --- a/common/templates/_sidebar.html +++ b/common/templates/_sidebar.html @@ -77,7 +77,9 @@ {% include 'users/profile_actions.html' %} {% endif %} -

{{ identity.summary|bleach:"a,p,span,br" }}

+

+ {{ identity.summary|bleach:"a,p,span,br"|default:"
" }} +

diff --git a/users/templates/users/profile_actions.html b/users/templates/users/profile_actions.html index 792d261c..5e0edc63 100644 --- a/users/templates/users/profile_actions.html +++ b/users/templates/users/profile_actions.html @@ -32,15 +32,30 @@ - {% elif identity.user and identity.user.mastodon_account %} - - - - - + {% else %} + {% if identity.user.is_superuser %} + + + + + + {% elif identity.user.is_staff %} + + + + + + {% endif %} + {% if identity.user and identity.user.mastodon_account %} + + + + + + {% endif %} {% endif %} {% if relationship.requested %}