Update target user in logs

This commit is contained in:
Miguel Nogueira 2020-09-08 00:07:50 +01:00
parent b0a935b8b3
commit e566e40404
1 changed files with 1 additions and 1 deletions

View File

@ -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);