diff --git a/app/models/packages.py b/app/models/packages.py index f6fa0a48..fb35aa34 100644 --- a/app/models/packages.py +++ b/app/models/packages.py @@ -682,9 +682,9 @@ class Package(db.Model): elif perm == Permission.APPROVE_RELEASE: return (is_maintainer or is_approver) and user.rank.at_least(UserRank.MEMBER if self.approved else UserRank.NEW_MEMBER) - # Anyone can change the package name when not approved, but only editors when approved + # Anyone can change the package name when not approved elif perm == Permission.CHANGE_NAME: - return not self.approved or user.rank.at_least(UserRank.EDITOR) + return not self.approved # Editors can change authors and approve new packages elif perm == Permission.APPROVE_NEW or perm == Permission.CHANGE_AUTHOR: diff --git a/app/templates/packages/create_edit.html b/app/templates/packages/create_edit.html index 0e1accb4..428c4ed4 100644 --- a/app/templates/packages/create_edit.html +++ b/app/templates/packages/create_edit.html @@ -69,7 +69,7 @@ {{ render_field(form.title, class_="pkg_meta col-sm-5") }} {% if package and package.approved and not package.check_perm(current_user, "CHANGE_NAME") %} {{ render_field(form.name, class_="pkg_meta col-sm-4", - readonly=True, hint=_("Please open a thread to request a name change")) }} + readonly=True, hint=_("You need to unpublish the package to change the name.")) }} {% else %} {{ render_field(form.name, class_="pkg_meta col-sm-4", pattern="[a-z0-9_]+", title=_("Lower case letters (a-z), digits (0-9), and underscores (_) only")) }} {% endif %}