mirror of
https://github.com/flarum/framework.git
synced 2024-12-02 06:53:47 +08:00
Properly return allow / deny instead of boolean
This commit is contained in:
parent
64d965fa17
commit
c9b9c1ddce
|
@ -34,6 +34,6 @@ class TagPolicy extends AbstractPolicy
|
||||||
*/
|
*/
|
||||||
public function addToDiscussion(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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user