Skip to content

Commit

Permalink
Fixing the impersonation
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanedev-maroc committed Jun 17, 2017
1 parent c1aeced commit 3d5caaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function hasPasswordReset()
*/
public function canImpersonate()
{
return $this->isAdmin();
return impersonator()->isEnabled() && $this->isAdmin();
}

/**
Expand All @@ -118,6 +118,6 @@ public function canImpersonate()
*/
public function canBeImpersonated()
{
return ! $this->isAdmin();
return impersonator()->isEnabled() && ! $this->isAdmin();
}
}

0 comments on commit 3d5caaf

Please sign in to comment.