A9: operations console, three pause commands, admin and player reports (WEB-30..32, WEB-40..44, WEB-55, AUD-48)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3d1e820564
commit
eab141f467
24 files changed
+928
-11
No files matched your search
@@ -698,3 +698,14 @@ nome tra parentesi quadre nel log è il modulo (`app.rounds.scheduler`, ecc.).
|
||||
*Stato:* implementato (A2) ·
|
||||
*Codice:* `apps/lottery/audit.py:record`, `apps/lottery/models.py:AuditEntry`, `apps/lottery/migrations/0002_audit_append_only_triggers.py` ·
|
||||
*Test:* `tests/django/test_models.py::test_an_audit_row_cannot_be_changed_with_raw_sql_either`, `test_the_audit_is_written_in_the_same_transaction_as_the_change`
|
||||
|
||||
- **[AUD-48]** **Azioni della console, delle segnalazioni e degli utenti.** Ogni comando di `/ops/` scrive una riga con attore,
|
||||
motivo (obbligatorio, 5–500 caratteri) e `payload {"command"}`: `pause_after_round_enabled`/`pause_after_round_disabled`,
|
||||
`new_bets_suspended`/`new_bets_resumed`, `withdrawals_suspended`/`withdrawals_resumed` ([WEB-40](sito-e-app.md),
|
||||
[WEB-41](sito-e-app.md), [WEB-42](sito-e-app.md)). Un comando negato (giocatore o staff senza il permesso) scrive la stessa
|
||||
azione con esito `denied` e nessun cambiamento; un comando già nello stato richiesto non scrive nulla. Le segnalazioni scrivono
|
||||
`report_submitted` (invio) e `report_status_changed` (`payload {"from", "to"}`, da `/admin/`); la modifica di `is_active`,
|
||||
`is_staff` o `is_superuser` di un utente in `/admin/` scrive `user_changed`.
|
||||
*Stato:* implementato (A9) ·
|
||||
*Codice:* `apps/lottery/console.py:run_command`, `apps/lottery/admin.py:ReportAdmin.save_model`, `apps/accounts/admin.py:AccountAdmin.save_model`, `apps/accounts/views.py:report_view` ·
|
||||
*Test:* `tests/django/test_console.py::test_each_command_switches_only_its_own_flag_and_is_audited`, `test_a_player_cannot_run_a_command_and_the_refusal_is_audited`, `test_changing_a_report_status_in_the_admin_is_audited`, `test_deactivating_a_user_in_the_admin_is_audited`
|
||||
Reference in new issue
Block a user