diff --git a/files/classes/user.py b/files/classes/user.py
index ccb394c97..559c9c3ed 100644
--- a/files/classes/user.py
+++ b/files/classes/user.py
@@ -793,7 +793,7 @@ class User(Base):
@property
@lazy
def banner_url(self):
- if FEATURES['USERS_PROFILE_BANNER'] and self.bannerurl:
+ if FEATURES['USERS_PROFILE_BANNER'] and self.bannerurl and self.can_see_my_shit:
return self.bannerurl
return f"/i/{SITE_NAME}/site_preview.webp?v=3009"
@@ -804,7 +804,7 @@ class User(Base):
return f"{SITE_FULL}/e/chudsey.webp"
if self.rainbow:
return f"{SITE_FULL}/e/marseysalutepride.webp"
- if self.profileurl:
+ if self.profileurl and self.can_see_my_shit:
if self.profileurl.startswith('/'): return SITE_FULL + self.profileurl
return self.profileurl
return f"{SITE_FULL}/i/default-profile-pic.webp?v=1008"
@@ -1207,3 +1207,9 @@ class User(Base):
@lazy
def can_toggle_event_music(self):
return SITE_NAME != 'rDrama' or self.has_badge(91)
+
+ @property
+ @lazy
+ def can_see_my_shit(self):
+ v = g.v
+ return not u.shadowbanned or (v and (v.id == u.id or v.can_see_shadowbanned))
diff --git a/files/templates/user_listing.html b/files/templates/user_listing.html
index 70762a870..34371ddd7 100644
--- a/files/templates/user_listing.html
+++ b/files/templates/user_listing.html
@@ -32,7 +32,7 @@
Last active on
{%- endif %}
- {% if FEATURES['USERS_PROFILE_BODYTEXT'] and not hide_bios and u.bio_html and (not u.shadowbanned or (v and (v.id == u.id or v.can_see_shadowbanned))) %}
+ {% if FEATURES['USERS_PROFILE_BODYTEXT'] and not hide_bios and u.bio_html and u.can_see_my_shit %}
- {% if FEATURES['PRONOUNS'] %}
+ {% if FEATURES['PRONOUNS'] and u.can_see_my_shit %}
{{u.pronouns}}
{% endif %}
- {% if u.customtitle %}
+ {% if u.customtitle and u.can_see_my_shit %}
{{u.customtitle | safe}}
{% endif %}
@@ -90,18 +90,18 @@
{% if FEATURES['USERS_PROFILE_BODYTEXT'] -%}
- {% if u.bio_html and (not u.shadowbanned or (v and (v.id == u.id or v.can_see_shadowbanned))) %}
+ {% if u.bio_html and u.can_see_my_shit %}
{{u.bio_html | safe}}
{% else %}
No bio...
{% endif %}
- {% if u.friends_html %}
+ {% if u.friends_html and u.can_see_my_shit %}
Friends:
{{u.friends_html | safe}}
{% endif %}
- {% if u.enemies_html %}
+ {% if u.enemies_html and u.can_see_my_shit %}
@@ -314,11 +314,11 @@
Follows you
{% endif %}
- {% if FEATURES['PRONOUNS'] %}
+ {% if FEATURES['PRONOUNS'] and u.can_see_my_shit %}
{{u.pronouns}}
{% endif %}
- {% if u.customtitle %}
+ {% if u.customtitle and u.can_see_my_shit %}
{{u.customtitle | safe}}
{% endif %}
@@ -351,16 +351,16 @@
{% if FEATURES['USERS_PROFILE_BODYTEXT'] -%}
- {% if u.bio_html and (not u.shadowbanned or (v and (v.id == u.id or v.can_see_shadowbanned))) %}
+ {% if u.bio_html and u.can_see_my_shit %}
{{u.bio_html | safe}}
{% endif %}
- {% if u.friends_html %}
+ {% if u.friends_html and u.can_see_my_shit %}
Friends:
{{u.friends_html | safe}}
{% endif %}
- {% if u.enemies_html %}
+ {% if u.enemies_html and u.can_see_my_shit %}
Enemies:
{{u.enemies_html | safe}}
{% endif %}
diff --git a/files/templates/userpage/userpage.html b/files/templates/userpage/userpage.html
index 838f8b3aa..bb836a5ac 100644
--- a/files/templates/userpage/userpage.html
+++ b/files/templates/userpage/userpage.html
@@ -5,7 +5,7 @@
{% if u and u.profile_background %}
{% endif %}
- {% if u and (u.profilecss or u.profile_background) and not request.values.get('nocss') %}
+ {% if u and (u.profilecss or u.profile_background) and not request.values.get('nocss') and u.can_see_my_shit %}
{% endif %}
{% endblock %}
@@ -27,7 +27,7 @@
{{u.username}}
{% endif %}
-{% if not IS_FISTMAS() or SITE_NAME == 'WPD' %}
+{% if (not IS_FISTMAS() or SITE_NAME == 'WPD') and u.can_see_my_shit %}
{% endif %}
{% endblock %}
diff --git a/files/templates/util/html_head.html b/files/templates/util/html_head.html
index 5b631fa1d..bbac0ffcb 100644
--- a/files/templates/util/html_head.html
+++ b/files/templates/util/html_head.html
@@ -50,7 +50,7 @@
{{0 if u.shadowbanned else u.real_comment_count(v)}}
Comments
{%- endif -%}
- {% if u.bio and (not u.shadowbanned or (v and (v.id == u.id or v.can_see_shadowbanned))) %}
+ {% if u.bio and u.can_see_my_shit %}
- {{u.bio}}
{% endif %}
{% endset %}