Audit module: audit log and address bans
PR CI / flow (pull_request) Successful in 4s
PR CI / ledger (pull_request) Successful in 4s
PR CI / test (stable) (pull_request) Successful in 35s
PR CI / test (lowest) (pull_request) Successful in 40s
PR CI / security (pull_request) Successful in 51s
PR CI / pr-ci (pull_request) Successful in 1s
PR CI / release-automerge (pull_request) Successful in 4s

This commit is contained in:
Matthijs Iriks committed 2026-12-04 02:32:22 +01:00
1 parent 60e18a229d
commit 57f51f9b61
41 files changed
+2137 -5

No files matched your search

+3
View File
@@ -9,6 +9,7 @@ use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Validation\ValidationException;
use IriksIT\Manager\Models\Group;
use IriksIT\Manager\Support\AuditTrail;
/**
* The accounts of the manager and the groups each is in.
@@ -70,6 +71,7 @@ class AccountController
$me = $request->user();
$user = $this->find($account);
abort_unless($me->managerOutranks($user), 403);
app(AuditTrail::class)->about($user);
$request->validate([...$this->rules(), 'password' => ['nullable', 'string', 'min:12', 'max:200']]);
$details = $this->details($request, $user);
@@ -98,6 +100,7 @@ class AccountController
$me = $request->user();
$user = $this->find($account);
abort_unless($me->managerOutranks($user), 403);
app(AuditTrail::class)->about($user);
if ($user->is($me)) {
return response()->json(['message' => 'You cannot delete your own account.'], 422);