From dedbc0296898d27c1c3961d5a3ab428d3bf13299 Mon Sep 17 00:00:00 2001 From: TLSM Date: Tue, 21 Jun 2022 21:13:25 -0400 Subject: [PATCH] Allow admin approval of others' TLM-less chudposts. --- files/routes/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index 4a592676bc..049b79202d 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1217,7 +1217,7 @@ def unban_post(post_id, v): post = g.db.get(Submission, post_id) - if post.author.agendaposter and AGENDAPOSTER_PHRASE not in post.body.lower(): + if post.author.id == v.id and post.author.agendaposter and AGENDAPOSTER_PHRASE not in post.body.lower(): return {"error": "You can't bypass the chud award!"} if not post: @@ -1424,7 +1424,7 @@ def api_unban_comment(c_id, v): comment = g.db.get(Comment, c_id) if not comment: abort(404) - if comment.author.agendaposter and AGENDAPOSTER_PHRASE not in comment.body.lower(): + if comment.author.id == v.id and comment.author.agendaposter and AGENDAPOSTER_PHRASE not in comment.body.lower(): return {"error": "You can't bypass the chud award!"} if comment.is_banned: