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", [ Log::debug("Authorization check started", [
'requiredRoles' => 'admin', 'requiredRoles' => 'admin',
'hasRequiredRole' => $user->hasRole('admin'), 'hasRequiredRole' => $user->hasRole('admin'),
'targetUser' => $user->username, 'targetUser' => $targetUser->username,
'isCurrentUser' => Auth::user()->is($user) 'isCurrentUser' => Auth::user()->is($user)
]); ]);
return $user->hasRole('admin') && $user->isNot($targetUser); return $user->hasRole('admin') && $user->isNot($targetUser);