diff --git a/files/routes/notifications.py b/files/routes/notifications.py index 2cdb89989..abe976744 100644 --- a/files/routes/notifications.py +++ b/files/routes/notifications.py @@ -298,7 +298,7 @@ def notifications_reddit(v:User): def notifications(v:User): page = get_page() - if v.admin_level < PERMS['USER_SHADOWBAN']: + if not session.get("GLOBAL") and v.admin_level < PERMS['USER_SHADOWBAN']: unread_and_inaccessible = g.db.query(Notification).join(Notification.comment).join(Comment.author).filter( Notification.user_id == v.id, Notification.read == False, diff --git a/files/routes/users.py b/files/routes/users.py index bb923945a..9de8617ee 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -868,7 +868,7 @@ def u_username_wall(v:Optional[User], username:str): is_following = v and u.has_follower(v) - if v and v.id != u.id and not v.admin_level: + if v and v.id != u.id and not v.admin_level and not session.get("GLOBAL"): view = g.db.query(ViewerRelationship).filter_by(viewer_id=v.id, user_id=u.id).one_or_none() if view: view.last_view_utc = int(time.time()) else: view = ViewerRelationship(viewer_id=v.id, user_id=u.id) @@ -918,7 +918,7 @@ def u_username_wall_comment(v:User, username:str, cid): is_following = v and u.has_follower(v) - if v and v.id != u.id and not v.admin_level: + if v and v.id != u.id and not v.admin_level and not session.get("GLOBAL"): view = g.db.query(ViewerRelationship).filter_by(viewer_id=v.id, user_id=u.id).one_or_none() if view: view.last_view_utc = int(time.time()) else: view = ViewerRelationship(viewer_id=v.id, user_id=u.id) @@ -970,7 +970,7 @@ def u_username(v:Optional[User], username:str): 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 not v.admin_level: + if v and v.id != u.id and not v.admin_level and not session.get("GLOBAL"): view = g.db.query(ViewerRelationship).filter_by(viewer_id=v.id, user_id=u.id).one_or_none() if view: view.last_view_utc = int(time.time()) else: view = ViewerRelationship(viewer_id=v.id, user_id=u.id) @@ -1041,7 +1041,7 @@ def u_username_comments(username, v=None): 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 not v.admin_level: + if v and v.id != u.id and not v.admin_level and not session.get("GLOBAL"): view = g.db.query(ViewerRelationship).filter_by(viewer_id=v.id, user_id=u.id).one_or_none() if view: view.last_view_utc = int(time.time()) else: view = ViewerRelationship(viewer_id=v.id, user_id=u.id)