mirror of
https://git.wownero.com/lza_menace/suchwow.git
synced 2024-08-15 01:03:19 +00:00
remove mod/approval req to view images
This commit is contained in:
parent
bcc7601d89
commit
00abdd5fd0
1 changed files with 1 additions and 7 deletions
|
@ -169,10 +169,4 @@ def delete(id):
|
|||
@bp.route("/uploads/<path:filename>")
|
||||
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"))
|
||||
|
|
Loading…
Reference in a new issue