aboutsummaryrefslogtreecommitdiff
path: root/app/views/threads.py
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-07-28 15:19:30 +0100
committerrubenwardy <rw@rubenwardy.com>2018-07-28 15:19:30 +0100
commit909a2b4ce9ffd325fff06cc26d996c19ca117aa6 (patch)
treed830c632731c358f662c75b5efb45fc04fcb7423 /app/views/threads.py
parentdf8d05f09d3dd7dacdb401661ea60706d2f21779 (diff)
downloadcheatdb-909a2b4ce9ffd325fff06cc26d996c19ca117aa6.tar.xz
Add support for post-approval threads
Diffstat (limited to 'app/views/threads.py')
-rw-r--r--app/views/threads.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/views/threads.py b/app/views/threads.py
index 2aa815e..316ca4d 100644
--- a/app/views/threads.py
+++ b/app/views/threads.py
@@ -92,7 +92,7 @@ def new_thread_page():
flash("Unable to find that package!", "error")
# Don't allow making threads on approved packages for now
- if package is None or package.approved:
+ if package is None:
abort(403)
def_is_private = request.args.get("private") or False
@@ -102,8 +102,7 @@ def new_thread_page():
is_review_thread = package is not None and not package.approved
# Check that user can make the thread
- if is_review_thread and not (package.author == current_user or \
- package.checkPerm(current_user, Permission.APPROVE_NEW)):
+ if not package.checkPerm(current_user, Permission.CREATE_THREAD):
flash("Unable to create thread!", "error")
return redirect(url_for("home_page"))