Prevent new threads being created on approved packages

This commit is contained in:
rubenwardy 2018-06-11 23:22:48 +01:00
parent 86dd137f75
commit e8cc685f89
No known key found for this signature in database
GPG Key ID: A1E29D52FF81513C
1 changed files with 2 additions and 1 deletions

View File

@ -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