mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
- AdminLogger: JSON-lines → /var/log/xamxam.log (prod) / storage/logs/admin.log (dev) + best-effort DB mirror to admin_audit_log table - DB: admin_audit_log table, share_links.is_archived column - ShareLink: archive() replaces delete(), toggleActive() returns new state, listActive()/listArchived() split, validateLink blocks archived slugs - All action handlers wired: publish, unpublish, visibility, delete, csv/db export, tfe add/edit, tags, pages, apropos, form-help, access-request, maintenance, settings (formulaire toggles, objet types, smtp update), smtp-test - acces.php: archive button replaces delete; collapsible archived links section - setup-server.sh: provision /var/log/xamxam.log (www-data:xamxam 640)
3.2 KiB
3.2 KiB
XAMXAM TODO
Duplicate TFE submission prevention (fixes)
DuplicateThesisException— typed exception carrying existing thesis metadataDatabase::findDuplicateThesis()— year + author + normalised-title matching (exact, prefix, Levenshtein ≤10%)ThesisCreateController::submit()— calls duplicate check before any DB write, throwsDuplicateThesisExceptionAppLogger::logDuplicate()— dedicated log action (status: duplicate) for audit trailApp::flash/consumeFlash— extended to supportwarningtype alongsideerror/successadmin/actions/formulaire.php— catchesDuplicateThesisExceptionseparately; logs it; flashes HTML warning with link to existing thesis; repopulates formpartage/index.php— same catch block; plain-text warning (no admin link) surfaced on the student form viaflash-warningbanner; form repopulatedtoast.php— renderstoast--warningblockadmin.css—.toast--warningstyle + link colourform.css—.flash-warningstyle (partage form)
Admin audit logging
AdminLoggerclass — JSON-lines to/var/log/xamxam.log(prod) orstorage/logs/admin.log(dev), mirrors toadmin_audit_logDB tableadmin_audit_logDB table — created in schema + migratedshare_links.is_archivedcolumn — archive replaces delete; stats preservedShareLink::archive()— new method;toggleActivereturns new state;listActive()/listArchived()split;validateLinkblocks archived slugsactions/acces-etudiante.php— delete→archive, all actions logged (create, toggle, set_password, archive)actions/publish.php— publish/unpublish loggedactions/delete.php— delete / bulk-delete / delete-all loggedactions/visibility.php— visibility changes loggedactions/export-csv.php— CSV export loggedactions/export-db.php— DB export loggedactions/edit.php— TFE edit loggedactions/formulaire.php— TFE add from admin loggedactions/tag.php— rename/merge/delete loggedactions/page.php— static page edits loggedactions/apropos.php— à-propos edits loggedactions/form-help.php— form structure edits loggedactions/access-request.php— approve/reject loggedactions/maintenance.php— maintenance on/off loggedactions/settings.php— formulaire toggles, objet types, SMTP update loggedactions/smtp-test.php— SMTP test loggedtemplates/admin/acces.php— archive button, archived links collapsible sectionscripts/setup-server.sh— provision/var/log/xamxam.logwith correct ownership
Duplicate warning display fixes
toast-fragment.php— 204 guard now also checkswarning; warning was silently discarded beforepartage/index.php— warning stored as plain text (no pre-escaping);htmlspecialchars()applied once at render; was double-encoded beforepartage/index.php—flash-warningdiv getsid+tabindex=-1; inline JS scrolls and focuses it on loadadmin/footer.php—htmx:afterSettlelistener focuses.toast--warningafter HTMX injects the toast fragment