From 1d7f67b444ce3f3813bfe929b601753967deb929 Mon Sep 17 00:00:00 2001 From: fireworks88 Date: Thu, 9 Sep 2021 22:34:03 +0200 Subject: [PATCH] gzu --- files/routes/search.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/files/routes/search.py b/files/routes/search.py index 734eb3658..354ab61e4 100644 --- a/files/routes/search.py +++ b/files/routes/search.py @@ -52,10 +52,13 @@ def searchlisting(criteria, v=None, page=1, t="None", sort="top", b=None): posts = posts.filter(Submission.over_18==True) if 'author' in criteria: - posts=posts.filter( - Submission.author_id==get_user(criteria['author']).id, - User.is_private==False, - ) + if v and v.admin_level == 6: + posts = posts.filter(Submission.author_id == get_user(criteria['author']).id) + else: + posts=posts.filter( + Submission.author_id==get_user(criteria['author']).id, + User.is_private==False, + ) if 'domain' in criteria: domain=criteria['domain']