Skip to content

Commit acf4f8e

Browse files
committed
Check if user is logged in before checking role
1 parent 83e82ca commit acf4f8e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Repositories/Sentinel/SentinelAuthentication.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ public function completeResetPassword($user, $code, $password)
116116
*/
117117
public function hasAccess($permission)
118118
{
119+
if (! Sentinel::check()) {
120+
return false;
121+
}
122+
119123
return Sentinel::hasAccess($permission);
120124
}
121125

0 commit comments

Comments
 (0)