From d0832b7905c109b2ac1f89ecb1399b49e8e13505 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 27 Dec 2021 07:09:22 +0200 Subject: [PATCH] fds --- files/routes/posts.py | 1 + 1 file changed, 1 insertion(+) diff --git a/files/routes/posts.py b/files/routes/posts.py index eccdaf8e43..c437f1bf00 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -1327,6 +1327,7 @@ def api_pin_post(post_id, v): post = g.db.query(Submission).filter_by(id=post_id).first() if post: + if v.id != post.author_id: return {"error": "Only the post author's can do that!"} post.is_pinned = not post.is_pinned g.db.add(post) g.db.commit()