diff --git a/aurweb/routers/accounts.py b/aurweb/routers/accounts.py index 6472ccae..4e0ce33b 100644 --- a/aurweb/routers/accounts.py +++ b/aurweb/routers/accounts.py @@ -341,7 +341,7 @@ def cannot_edit(request: Request, user: models.User) \ :param user: Target user to be edited :return: RedirectResponse if approval != granted else None """ - approved = request.user.has_credential(creds.ACCOUNT_EDIT, approved=[user]) + approved = request.user.can_edit_user(user) if not approved and (to := "/"): if user: to = f"/account/{user.Username}" diff --git a/templates/account/show.html b/templates/account/show.html index c6a53f4a..26cfbc21 100644 --- a/templates/account/show.html +++ b/templates/account/show.html @@ -86,7 +86,7 @@ | safe }} - {% if request.user.has_credential(creds.ACCOUNT_EDIT, approved=[user]) %} + {% if request.user.can_edit_user(user) %}
  • {{ "%sEdit this user's account%s" | tr