Skip to content

Commit

Permalink
Update RoleFilter.php
Browse files Browse the repository at this point in the history
  • Loading branch information
fefo-p authored Aug 8, 2019
1 parent 613d7cf commit 47dbaef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Filters/RoleFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public function before(RequestInterface $request, $params = null)
{

This comment has been minimized.

Copy link
@MGatner

MGatner Aug 8, 2019

Collaborator

I think you might want:

if ($result = $authorize->inGroup($group, $authenticate->id())
{
break;
}

And then you wouldn’t need the else which currently will cause false negatives.

This comment has been minimized.

Copy link
@fefo-p

fefo-p Aug 8, 2019

Author Contributor

Maybe, but I think like you said it will always be true, no matter what $result ends up being.
But I get what you mean. Will look into it later when I can test. Right now I'm at work and don't have my computer with me.

$result = $authorize->inGroup($group, $authenticate->id());
}
else return;
}

if (! $result)
Expand Down

0 comments on commit 47dbaef

Please sign in to comment.