mirror of
https://github.com/flarum/core.git
synced 2025-07-18 15:21:16 +02:00
Don't need to make empty discussions visible anymore
As per flarum/core@557a65aadd
This commit is contained in:
@@ -38,26 +38,11 @@ class DiscussionPolicy extends AbstractPolicy
|
|||||||
$this->events = $events;
|
$this->events = $events;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Builder $query
|
|
||||||
* @param User $actor
|
|
||||||
*/
|
|
||||||
public function findEmpty(User $actor, Builder $query)
|
|
||||||
{
|
|
||||||
$this->showIfApprovable($actor, $query);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Builder $query
|
* @param Builder $query
|
||||||
* @param User $actor
|
* @param User $actor
|
||||||
*/
|
*/
|
||||||
public function findPrivate(User $actor, Builder $query)
|
public function findPrivate(User $actor, Builder $query)
|
||||||
{
|
|
||||||
$this->showIfApprovable($actor, $query);
|
|
||||||
}
|
|
||||||
|
|
||||||
private function showIfApprovable(User $actor, Builder $query)
|
|
||||||
{
|
{
|
||||||
// Show empty/private discussions if they require approval and they are
|
// Show empty/private discussions if they require approval and they are
|
||||||
// authored by the current user, or the current user has permission to
|
// authored by the current user, or the current user has permission to
|
||||||
|
Reference in New Issue
Block a user