fix: user deletion on instances without account lockability

This commit is contained in:
Éloi Rivard 2023-09-28 18:27:43 +02:00
parent 529e0c2493
commit 9c5ef421d0
No known key found for this signature in database
GPG key ID: 7EDA204EA57DD184
2 changed files with 7 additions and 5 deletions

View file

@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`_,
and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_.
Fixed
*****
- Canaille installations without account lockabilty could not
delete users. :pr:`153`
Added
*****

View file

@ -666,11 +666,7 @@ def profile_settings(user, edited_user):
):
return profile_settings_edit(user, edited_user)
if (
request.form.get("action") == "confirm-delete"
and BaseBackend.get().has_account_lockability()
and not edited_user.locked
):
if request.form.get("action") == "confirm-delete":
return render_template("modals/delete-account.html", edited_user=edited_user)
if request.form.get("action") == "delete":