diff --git a/files/routes/search.py b/files/routes/search.py index 84181c6ea..26639f56c 100644 --- a/files/routes/search.py +++ b/files/routes/search.py @@ -67,7 +67,7 @@ def searchposts(v): if 'author' in criteria: author = get_user(criteria['author']) - if author.is_private: + if author.is_private and v.admin_level < 2 and not v.eye: if request.headers.get("Authorization"): return {"error": f"@{author.username}'s profile is private; You can't use the 'author' syntax on them"} return render_template(f"{template}search.html", @@ -214,7 +214,7 @@ def searchcomments(v): if 'author' in criteria: author = get_user(criteria['author']) - if author.is_private: + if author.is_private and v.admin_level < 2 and not v.eye: if request.headers.get("Authorization"): return {"error": f"@{author.username}'s profile is private; You can't use the 'author' syntax on them"}