beabigegg
10db2c9d1f
feat: implement audit trail alignment (soft delete & permission audit)
- Task Soft Delete:
- Add is_deleted, deleted_at, deleted_by fields to Task model
- Convert DELETE to soft delete with cascade to subtasks
- Add include_deleted query param (admin only)
- Add POST /api/tasks/{id}/restore endpoint
- Exclude deleted tasks from subtask_count
- Permission Change Audit:
- Add user.role_change event (high sensitivity)
- Add user.admin_change event (critical, triggers alert)
- Add PATCH /api/users/{id}/admin endpoint
- Add role.permission_change event type
- Append-Only Enforcement:
- Add DB triggers for audit_logs immutability (manual for production)
- Migration 008 with graceful trigger failure handling
- Tests: 11 new soft delete tests (153 total passing)
- OpenSpec: fix-audit-trail archived, fix-realtime-notifications & fix-weekly-report proposals added
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 06:58:30 +08:00
..
2025-12-28 23:41:37 +08:00
2025-12-29 01:13:21 +08:00
2025-12-29 22:03:05 +08:00
2025-12-29 21:21:18 +08:00
2025-12-28 23:41:37 +08:00
2025-12-29 20:45:07 +08:00
2025-12-29 00:31:34 +08:00
2025-12-29 22:59:00 +08:00
2025-12-30 06:58:30 +08:00
2025-12-29 00:31:34 +08:00
2025-12-29 00:31:34 +08:00
2025-12-29 22:59:00 +08:00
2025-12-28 23:41:37 +08:00
2025-12-29 01:13:21 +08:00
2025-12-29 01:13:21 +08:00