From 4c86cd4be3c94bdc1751c08a326adf79afdea4ce Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Tue, 13 Sep 2022 22:33:20 +0200 Subject: [PATCH] Always show followers/following page when admin --- app/main.py | 4 ++-- app/templates/header.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/main.py b/app/main.py index 62e5e69..3a488be 100644 --- a/app/main.py +++ b/app/main.py @@ -446,7 +446,7 @@ async def followers( ) ) - if config.HIDES_FOLLOWERS: + if config.HIDES_FOLLOWERS and not is_current_user_admin(request): raise HTTPException(status_code=404) # We only show the most recent 20 followers on the public website @@ -505,7 +505,7 @@ async def following( ) ) - if config.HIDES_FOLLOWING: + if config.HIDES_FOLLOWING and not is_current_user_admin(request): raise HTTPException(status_code=404) # We only show the most recent 20 follows on the public website diff --git a/app/templates/header.html b/app/templates/header.html index 5c7467e..d677408 100644 --- a/app/templates/header.html +++ b/app/templates/header.html @@ -36,10 +36,10 @@ {% if articles_count %}
  • {{ header_link("articles", "Articles") }}
  • {% endif %} - {% if not HIDES_FOLLOWERS %} + {% if not HIDES_FOLLOWERS or is_admin %}
  • {{ header_link("followers", "Followers") }} {{ followers_count }}
  • {% endif %} - {% if not HIDES_FOLLOWING %} + {% if not HIDES_FOLLOWING or is_admin %}
  • {{ header_link("following", "Following") }} {{ following_count }}
  • {% endif %}
  • {{ header_link("get_remote_follow", "Remote follow") }}