diff options
author | rubenwardy <rw@rubenwardy.com> | 2018-07-28 15:19:30 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2018-07-28 15:19:30 +0100 |
commit | 909a2b4ce9ffd325fff06cc26d996c19ca117aa6 (patch) | |
tree | d830c632731c358f662c75b5efb45fc04fcb7423 /app/views/threads.py | |
parent | df8d05f09d3dd7dacdb401661ea60706d2f21779 (diff) | |
download | cheatdb-909a2b4ce9ffd325fff06cc26d996c19ca117aa6.tar.xz |
Add support for post-approval threads
Diffstat (limited to 'app/views/threads.py')
-rw-r--r-- | app/views/threads.py | 5 |
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")) |