Skip to content

Commit

Permalink
[4.x] Impersonate should check on id() not full class (#8763)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmitchell authored Sep 25, 2023
1 parent 703f8fd commit 8ccec8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Actions/Impersonate.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function visibleTo($item)
return false;
}

return $item instanceof UserContract && $item != User::current();
return $item instanceof UserContract && $item->id() != User::current()->id();
}

public function visibleToBulk($items)
Expand Down

0 comments on commit 8ccec8f

Please sign in to comment.