Skip to content

Commit ffcf6d7

Browse files
Allow Policies to work for unauthenticated calls
1 parent 2d40c7a commit ffcf6d7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Illuminate/Auth/Access/Gate.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,7 @@ public function authorize($ability, $arguments = [])
296296
*/
297297
protected function raw($ability, $arguments = [])
298298
{
299-
if (! $user = $this->resolveUser()) {
300-
return false;
301-
}
299+
$user = $this->resolveUser();
302300

303301
$arguments = Arr::wrap($arguments);
304302

0 commit comments

Comments
 (0)