1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-02 17:06:09 +00:00
webvirtcloud/admin
catborise b65d2abaf6 fix(admin): two administrators at once leave a superuser and one user per address
An administrator cannot block, delete or demote their own account, but
with two superusers each could block the other at the same moment, and
none was left. Changes of the panel's users (create, edit, block,
unblock, delete, group edits, and a user's own profile) now run one at
a time, under a claim every worker sees, and a block, delete or edit
that would leave no active superuser is refused.

Under that claim each change reads the user or group as saved now: the
edit forms' fingerprint is compared there, a block writes only the
account's Active flag, and a profile saved while an administrator
blocks the account keeps the block.

A user's e-mail address is one user's, case aside, so that "Lost OTP?"
can mail it; two users created or edited at once each passed that check.
The form checks the address again under the same claim, with the save.
2026-11-13 14:54:51 +03:00
..
migrations fix(admin): the Technicians group migration can run on a database that has it 2026-11-06 11:01:58 +03:00
templates/admin fix(admin): a user or group form opened before another change does not undo it 2026-11-13 14:29:50 +03:00
tests fix(admin): two administrators at once leave a superuser and one user per address 2026-11-13 14:54:51 +03:00
__init__.py chore: remove code nothing uses 2026-11-06 10:53:37 +03:00
apps.py format python code with black 2022-11-02 08:54:35 +03:00
decorators.py feat(security): apply Codex review hardening to console tokens and superuser authorization 2026-09-27 11:30:03 +03:00
forms.py fix(accounts): owners given before one owner was the rule keep editable rights 2026-11-13 14:27:32 +03:00
models.py format python code with black 2022-11-02 08:54:35 +03:00
permissions.py feat(security): apply Codex review hardening to console tokens and superuser authorization 2026-09-27 11:30:03 +03:00
urls.py feat(admin): the Logs page searches every row, shows failures and downloads them 2026-10-25 23:08:42 +03:00
views.py fix(admin): two administrators at once leave a superuser and one user per address 2026-11-13 14:54:51 +03:00