mirror of
https://github.com/flarum/core.git
synced 2025-08-10 10:24:46 +02:00
Properly return allow / deny instead of boolean
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user