Skip to content

Commit

Permalink
Properly return allow / deny instead of boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
askvortsov1 committed Dec 18, 2020
1 parent bdfa6d0 commit 9f3a123
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Access/TagPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ public function startDiscussion(User $actor, Tag $tag)
*/
public function addToDiscussion(User $actor, Tag $tag)
{
return $actor->can('startDiscussion', $tag);
return $actor->can('startDiscussion', $tag) ? $this->allow() : $this->deny();
}
}

0 comments on commit 9f3a123

Please sign in to comment.