diff --git a/app/Policies/BanPolicy.php b/app/Policies/BanPolicy.php index e252976..754458e 100644 --- a/app/Policies/BanPolicy.php +++ b/app/Policies/BanPolicy.php @@ -47,7 +47,7 @@ class BanPolicy Log::debug("Authorization check started", [ 'requiredRoles' => 'admin', 'hasRequiredRole' => $user->hasRole('admin'), - 'targetUser' => $user->username, + 'targetUser' => $targetUser->username, 'isCurrentUser' => Auth::user()->is($user) ]); return $user->hasRole('admin') && $user->isNot($targetUser);