aboutsummaryrefslogtreecommitdiff
path: root/app/views/threads.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/threads.py')
-rw-r--r--app/views/threads.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/views/threads.py b/app/views/threads.py
index a842d58..2aa815e 100644
--- a/app/views/threads.py
+++ b/app/views/threads.py
@@ -27,8 +27,10 @@ from wtforms.validators import *
@app.route("/threads/")
def threads_page():
- threads = Thread.query.filter_by(private=False).all()
- return render_template("threads/list.html", threads=threads)
+ query = Thread.query
+ if not Permission.SEE_THREAD.check(current_user):
+ query = query.filter_by(private=False)
+ return render_template("threads/list.html", threads=query.all())
@app.route("/threads/<int:id>/", methods=["GET", "POST"])
def thread_page(id):