Keep an audit log of who did what, and how they came in
Written from model events, spatie's role events and panel sign-ins, only for what a person did, with secrets masked; pruned after a year. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use App\Models\AuditLog;
|
||||
use Illuminate\Support\Facades\Schedule;
|
||||
|
||||
/*
|
||||
@@ -44,3 +45,10 @@ Schedule::command('repos:sync')
|
||||
})
|
||||
->withoutOverlapping()
|
||||
->runInBackground();
|
||||
|
||||
// Old audit entries: they name people and the addresses they worked from, so
|
||||
// they are kept for `audit.retention_days` and no longer.
|
||||
Schedule::command('model:prune', ['--model' => [AuditLog::class]])
|
||||
->daily()
|
||||
->withoutOverlapping()
|
||||
->runInBackground();
|
||||
|
||||
Reference in New Issue
Block a user