Files
wekan/client/lib
Lauri Ojansivu 57a24eb8ba Own account deletion and username change follow their settings on the server, and the last admin stays.
Admin Panel / People / Login / Self delete user account unticked only hid the
Delete and Anonymize buttons: removeUser and anonymizeUser on your own account
still worked, and so did DELETE /api/users/:userId for an administrator's own
id. And removeUser's self branch returned before the last-administrator
check, so the only site administrator could delete themselves.

Now every self-removal path asks models/lib/selfAccountRemoval.js: refused
while the setting is off (recorded in Admin Panel / Problems as Disabled
setting, never disabling the account), and refused for the last site
administrator (not recorded: the button is there, so it is ordinary use).

Username Change unticked: the setUsername method already refused, but the
Users allow rule still let a client write its own username directly; a
Users.deny rule now refuses that and records it.

Thanks to xet7 !
2026-11-22 18:39:49 +02:00
..
2020-05-24 12:46:39 +02:00
2025-10-21 15:19:19 +03:00
2020-05-24 12:46:39 +02:00