forked from rDrama/rDrama
1
0
Fork 0

remove redundant perm

master
Aevann 2023-08-31 14:04:51 +03:00
parent d6cbbc05c6
commit 19ac58bce1
2 changed files with 4 additions and 5 deletions

View File

@ -357,7 +357,6 @@ PERMS = { # Minimum admin_level to perform action.
'BYPASS_UNDER_SIEGE_MODE': 1,
'BYPASS_CHAT_TRUESCORE_REQUIREMENT': 1,
'BYPASS_ANTISPAM_CHECKS': 1,
'BYPASS_PROFILE_VIEWS': 1,
'WARN_ON_FAILED_LOGIN': 1,
'NOTIFICATIONS_REDDIT': 1,
'NOTIFICATIONS_SPECIFIC_WPD_COMMENTS': 1,

View File

@ -950,7 +950,7 @@ def u_username_wall(v, username):
is_following = v and u.has_follower(v)
if v and v.id != u.id and v.admin_level < PERMS['BYPASS_PROFILE_VIEWS'] and not session.get("GLOBAL"):
if v and v.id != u.id and v.admin_level < PERMS['USER_SHADOWBAN'] and not session.get("GLOBAL"):
gevent.spawn(_add_profile_view, v.id, u.id)
page = get_page()
@ -997,7 +997,7 @@ def u_username_wall_comment(v, username, cid):
is_following = v and u.has_follower(v)
if v and v.id != u.id and v.admin_level < PERMS['BYPASS_PROFILE_VIEWS'] and not session.get("GLOBAL"):
if v and v.id != u.id and v.admin_level < PERMS['USER_SHADOWBAN'] and not session.get("GLOBAL"):
gevent.spawn(_add_profile_view, v.id, u.id)
if v and request.values.get("read"):
@ -1042,7 +1042,7 @@ def u_username(v, username):
abort(403, f"@{u.username}'s userpage is private")
return render_template("userpage/private.html", u=u, v=v, is_following=is_following), 403
if v and v.id != u.id and v.admin_level < PERMS['BYPASS_PROFILE_VIEWS'] and not session.get("GLOBAL"):
if v and v.id != u.id and v.admin_level < PERMS['USER_SHADOWBAN'] and not session.get("GLOBAL"):
gevent.spawn(_add_profile_view, v.id, u.id)
sort = request.values.get("sort", "new")
@ -1109,7 +1109,7 @@ def u_username_comments(username, v):
abort(403, f"@{u.username}'s userpage is private")
return render_template("userpage/private.html", u=u, v=v, is_following=is_following), 403
if v and v.id != u.id and v.admin_level < PERMS['BYPASS_PROFILE_VIEWS'] and not session.get("GLOBAL"):
if v and v.id != u.id and v.admin_level < PERMS['USER_SHADOWBAN'] and not session.get("GLOBAL"):
gevent.spawn(_add_profile_view, v.id, u.id)
page = get_page()