1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-02 17:06:09 +00:00
webvirtcloud/admin/tests
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
..
__init__.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
edits.py fix(admin): a user or group form opened before another change does not undo it 2026-11-13 14:29:50 +03:00
test_audit_rows.py fix(admin): a user or group form opened before another change does not undo it 2026-11-13 14:29:50 +03:00
test_logs_page.py perf: the Logs and VM report downloads are written row by row 2026-11-05 18:58:13 +03:00
test_tombstones.py fix(logs): a row says what happened: a recovered migration, a failed clone step, a device not there 2026-11-07 14:36:34 +03:00
test_user_create.py fix(accounts): owners given before one owner was the rule keep editable rights 2026-11-13 14:27:32 +03:00
test_user_pages.py fix(admin): two administrators at once leave a superuser and one user per address 2026-11-13 14:54:51 +03:00
test_user_update_next.py fix(admin): a user or group form opened before another change does not undo it 2026-11-13 14:29:50 +03:00
test_views.py fix(admin): a user or group form opened before another change does not undo it 2026-11-13 14:29:50 +03:00