forked from Github-Mirrors/canaille
Merge branch 'account-lockability-fix' into 'main'
fix: user deletion on instances without account lockability See merge request yaal/canaille!153
This commit is contained in:
commit
d1f8a95f08
2 changed files with 7 additions and 5 deletions
|
@ -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/>`_,
|
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>`_.
|
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
|
Added
|
||||||
*****
|
*****
|
||||||
|
|
||||||
|
|
|
@ -666,11 +666,7 @@ def profile_settings(user, edited_user):
|
||||||
):
|
):
|
||||||
return profile_settings_edit(user, edited_user)
|
return profile_settings_edit(user, edited_user)
|
||||||
|
|
||||||
if (
|
if request.form.get("action") == "confirm-delete":
|
||||||
request.form.get("action") == "confirm-delete"
|
|
||||||
and BaseBackend.get().has_account_lockability()
|
|
||||||
and not edited_user.locked
|
|
||||||
):
|
|
||||||
return render_template("modals/delete-account.html", edited_user=edited_user)
|
return render_template("modals/delete-account.html", edited_user=edited_user)
|
||||||
|
|
||||||
if request.form.get("action") == "delete":
|
if request.form.get("action") == "delete":
|
||||||
|
|
Loading…
Reference in a new issue