mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-09 11:46:49 +00:00
fix(logs): blocking a blocked user writes no row; one upload submit path
Follow-ups from the review of the audit log layers: - Blocking a user who is already blocked, or unblocking one who is not, changes nothing and now writes no row, like any other edit that changes nothing. - write_chunk takes the request instead of the user and an optional request; the view always had one, so the branch only tests used is gone and every chunk 0 goes through the same audited submit. - Tests: a busy clone creates no job and its row carries the page's message; a later chunk that fails writes no submit row; libvirt refusing a network or pool delete is a failed row.
This commit is contained in:
parent
d5df187de4
commit
b24746c1cb
7 changed files with 52 additions and 29 deletions
|
|
@ -65,6 +65,8 @@ class UserRowTests(TestCase):
|
|||
carol = User.objects.get(username="carol")
|
||||
Logs.objects.all().delete()
|
||||
self.client.post(reverse("admin:user_block", args=[carol.pk]))
|
||||
self.client.post(reverse("admin:user_block", args=[carol.pk])) # already blocked: nothing changes
|
||||
self.client.post(reverse("admin:user_unblock", args=[carol.pk]))
|
||||
self.client.post(reverse("admin:user_unblock", args=[carol.pk]))
|
||||
self.client.post(reverse("admin:user_update_password", args=[carol.pk]),
|
||||
{"password1": "New-carol-pass-1", "password2": "New-carol-pass-1"})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue