From 00abdd5fd0776d5a405577fe0b8f2b1d94112d80 Mon Sep 17 00:00:00 2001 From: lza_menace Date: Thu, 28 Jan 2021 22:08:36 -0800 Subject: [PATCH] remove mod/approval req to view images --- suchwow/routes/post.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/suchwow/routes/post.py b/suchwow/routes/post.py index 239a51b..eddb2b4 100644 --- a/suchwow/routes/post.py +++ b/suchwow/routes/post.py @@ -169,10 +169,4 @@ def delete(id): @bp.route("/uploads/") def uploaded_file(filename): file_path = path.join(current_app.config["DATA_FOLDER"], "uploads") - post = Post.select().where(Post.image_name==filename).first() - is_mod = is_moderator(get_session_user()) - if is_mod or post.approved: - return send_from_directory(file_path, filename) - else: - flash("This image not available to view.") - return redirect(url_for("index")) + return send_from_directory(file_path, filename)