forked from rDrama/rDrama
1
0
Fork 0

allow ppl blocked by someone to visit that someone's profile

master
Aevann1 2022-09-11 10:57:06 +02:00
parent 14961d856f
commit 9c8bc0fdd6
2 changed files with 0 additions and 36 deletions

View File

@ -989,13 +989,6 @@ def u_username(username, v=None):
return render_template("userpage_blocking.html", u=u, v=v)
if v and v.admin_level < 2 and hasattr(u, 'is_blocked') and u.is_blocked:
if request.headers.get("Authorization") or request.headers.get("xhr") or request.path.endswith(".json"):
return {"error": "This person is blocking you."}, 403
return render_template("userpage_blocked.html", u=u, v=v)
sort = request.values.get("sort", "new")
t = request.values.get("t", "all")
try: page = max(int(request.values.get("page", 1)), 1)
@ -1086,12 +1079,6 @@ def u_username_comments(username, v=None):
return {"error": f"You are blocking @{u.username}."}, 403
return render_template("userpage_blocking.html", u=u, v=v)
if v and v.admin_level < 2 and hasattr(u, 'is_blocked') and u.is_blocked:
if request.headers.get("Authorization") or request.headers.get("xhr") or request.path.endswith(".json"):
return {"error": "This person is blocking you."}, 403
return render_template("userpage_blocked.html", u=u, v=v)
try: page = max(int(request.values.get("page", "1")), 1)
except: page = 1

View File

@ -1,23 +0,0 @@
{% extends "default.html" %}
{% block pagetype %}userpage{% endblock %}
{% block fixedMobileBarJS %}
{% endblock %}
{% block title %}
<title>{{u.username}}</title>
{% endblock %}
<div class="row no-gutters">
<div class="col-12">
<div class="text-center py-7 py-md-8">
<span class="fa-stack fa-2x text-muted mb-4">
<i class="fas fa-square text-danger opacity-25 fa-stack-2x"></i>
<i class="fas text-danger fa-user-cog fa-stack-1x text-lg"></i>
</span>
<h2 class="h5">@{{u.username}} has blocked you.</h2>
<p class="text-muted">You can't see their profile.</p>
</div>
</div>
</div>