Use 403 status code for unpublished pages

This commit is contained in:
rubenwardy 2023-01-02 17:20:08 +00:00
parent 34bbb281e0
commit a7bbb45fc2

@ -117,7 +117,7 @@ def getReleases(package):
@is_package_page @is_package_page
def view(package): def view(package):
if package.state != PackageState.APPROVED and not package.checkPerm(current_user, Permission.EDIT_PACKAGE): if package.state != PackageState.APPROVED and not package.checkPerm(current_user, Permission.EDIT_PACKAGE):
return render_template("packages/gone.html", package=package), 503 return render_template("packages/gone.html", package=package), 403
show_similar = not package.approved and ( show_similar = not package.approved and (
current_user in package.maintainers or current_user in package.maintainers or