Skip to content

Commit

Permalink
Update BaseCriteria.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian authored Feb 11, 2020
1 parent 773db7a commit c0130df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/Criterias/BaseCriteria.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ abstract class BaseCriteria implements CriteriaInterface
{
protected function godRole()
{
return auth()->guard('mage')->user()->hasRole(config('mage.authentication.god_role'));
return (auth()->guard('mage')->user() && auth()->guard('mage')->user()->hasRole(config('mage.authentication.god_role')));
}
}

0 comments on commit c0130df

Please sign in to comment.