Admin crud logging - #2571
Conversation
Adds LogsAdminActivity (event key map, identifying fields, redacted diffs), BaseAdminCreateRecord/BaseAdminEditRecord after-hooks, and LoggedDeleteAction, then reparents the five blocker resources onto them. EditServer's custom delete actions log inline; EditNode/EditServer afterSave now call parent. Mount joins the enforced morph map so it can be an activity subject.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (18)
Included review availability: Your plan provides up to 8 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe change adds shared admin activity logging for create, update, and delete operations. Admin resource pages adopt common base classes and logged delete actions. Activity translations, polymorphic mapping, and unit and integration tests are added. ChangesAdmin activity logging
Sequence Diagram(s)sequenceDiagram
participant AdminPage
participant LogsAdminActivity
participant Activity
AdminPage->>LogsAdminActivity: logAdminActivity(action, record)
LogsAdminActivity->>LogsAdminActivity: identify and redact properties
LogsAdminActivity->>Activity: record event with subject and properties
Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to Admin create, update, and delete activity logging paths are ready to merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
First half of admin CRUD audit logging, built on the existing activity-log system. Adds
LogsAdminActivity(event keys aligned with role permission models, identifying-fields-only payloads for create/delete, redacted old-to-new diffs for updates),BaseAdminCreateRecord/BaseAdminEditRecordwith after-hooks, andLoggedDeleteAction, then reparents Nodes, Eggs, Mounts, Users, and Servers onto them. Secrets (password,*token*,*_secret,*_key, ...) are masked at write time; no-op saves log nothing; every event attaches the record as subject since the admin panel isn't tenant-scoped.EditServer's custom delete/force-delete actions log inline, EditNode/EditServer
afterSavenow call parent, and Mount joins the enforced morph map. English labels added tolang/en/activity.php; other locales sync via the translation workflow.Covered by trait unit tests plus create/update/delete smoke tests per resource. Pairs with the viewer in #2569.
