diff --git a/app/models.py b/app/models.py index f632b7c0..b5607ab6 100644 --- a/app/models.py +++ b/app/models.py @@ -65,6 +65,7 @@ class Permission(enum.Enum): APPROVE_RELEASE = "APPROVE_RELEASE" APPROVE_NEW = "APPROVE_NEW" CHANGE_RELEASE_URL = "CHANGE_RELEASE_URL" + CHANGE_DNAME = "CHANGE_DNAME" CHANGE_RANK = "CHANGE_RANK" CHANGE_EMAIL = "CHANGE_EMAIL" EDIT_EDITREQUEST = "EDIT_EDITREQUEST" @@ -140,7 +141,7 @@ class User(db.Model, UserMixin): # Members can edit their own packages, and editors can edit any packages if perm == Permission.CHANGE_AUTHOR: return user.rank.atLeast(UserRank.EDITOR) - elif perm == Permission.CHANGE_RANK: + elif perm == Permission.CHANGE_RANK or perm == Permission.CHANGE_DNAME: return user.rank.atLeast(UserRank.MODERATOR) elif perm == Permission.CHANGE_EMAIL: return user == self or (user.rank.atLeast(UserRank.MODERATOR) and user.rank.atLeast(self.rank)) diff --git a/app/templates/users/user_profile_page.html b/app/templates/users/user_profile_page.html index 53afd571..e4f9ff01 100644 --- a/app/templates/users/user_profile_page.html +++ b/app/templates/users/user_profile_page.html @@ -7,7 +7,7 @@ {% block content %}