Skip to content

Commit

Permalink
Check if user is logged in before checking role
Browse files Browse the repository at this point in the history
  • Loading branch information
nWidart committed Jun 24, 2015
1 parent 83e82ca commit acf4f8e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Repositories/Sentinel/SentinelAuthentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ public function completeResetPassword($user, $code, $password)
*/
public function hasAccess($permission)
{
if (! Sentinel::check()) {
return false;
}

return Sentinel::hasAccess($permission);
}

Expand Down

0 comments on commit acf4f8e

Please sign in to comment.