aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-06-11 23:22:48 +0100
committerrubenwardy <rw@rubenwardy.com>2018-06-11 23:22:48 +0100
commite8cc685f896f65bb3b35bf360f78151eb53ddc8c (patch)
tree1c0ed0e7e36c8361ff85b1e9c5a9a4d332390638
parent86dd137f75e8461908e34645ebde9ba27fd96078 (diff)
downloadcheatdb-e8cc685f896f65bb3b35bf360f78151eb53ddc8c.tar.xz
Prevent new threads being created on approved packages
-rw-r--r--app/views/threads.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/threads.py b/app/views/threads.py
index e4973a5..c975e5f 100644
--- a/app/views/threads.py
+++ b/app/views/threads.py
@@ -75,7 +75,8 @@ def new_thread_page():
if package is None:
flash("Unable to find that package!", "error")
- if package is None:
+ # Don't allow making threads on approved packages for now
+ if package is None or package.approved:
abort(403)
def_is_private = request.args.get("private") or False