diff --git a/app/blueprints/packages/packages.py b/app/blueprints/packages/packages.py index c7a5c99b..c79e931a 100644 --- a/app/blueprints/packages/packages.py +++ b/app/blueprints/packages/packages.py @@ -438,7 +438,7 @@ def remove(package): flash("You don't have permission to do that.", "danger") return redirect(package.getDetailsURL()) - package.state = PackageState.READY_FOR_REVIEW + package.state = PackageState.WIP msg = "Unapproved {}".format(package.title) addNotification(package.maintainers, current_user, msg, package.getDetailsURL(), package) diff --git a/app/models.py b/app/models.py index c484f2e3..8a7ab658 100644 --- a/app/models.py +++ b/app/models.py @@ -813,7 +813,7 @@ class Package(db.Model): return isOwner or user.rank.atLeast(UserRank.MODERATOR) elif perm == Permission.UNAPPROVE_PACKAGE or perm == Permission.DELETE_PACKAGE: - return user.rank.atLeast(UserRank.EDITOR) + return user.rank.atLeast(UserRank.MEMBER if isOwner else UserRank.EDITOR) elif perm == Permission.CHANGE_RELEASE_URL: return user.rank.atLeast(UserRank.MODERATOR) diff --git a/app/templates/packages/remove.html b/app/templates/packages/remove.html index fd20637c..a588c348 100644 --- a/app/templates/packages/remove.html +++ b/app/templates/packages/remove.html @@ -1,19 +1,37 @@ {% extends "base.html" %} {% block title %} - Delete | {{ package.title }} +Delete | {{ package.title }} {% endblock %} {% block content %} -
{% endblock %} diff --git a/app/templates/todo/list.html b/app/templates/todo/list.html index c3b81187..30b90bbe 100644 --- a/app/templates/todo/list.html +++ b/app/templates/todo/list.html @@ -34,7 +34,11 @@