mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 08:39:25 +08:00
Don't need to make empty discussions visible anymore
As per flarum/core@557a65aadd
This commit is contained in:
parent
b34f978276
commit
eb36d98b82
@ -38,26 +38,11 @@ class DiscussionPolicy extends AbstractPolicy
|
||||
$this->events = $events;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Builder $query
|
||||
* @param User $actor
|
||||
*/
|
||||
public function findEmpty(User $actor, Builder $query)
|
||||
{
|
||||
$this->showIfApprovable($actor, $query);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Builder $query
|
||||
* @param User $actor
|
||||
*/
|
||||
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
|
||||
// authored by the current user, or the current user has permission to
|
||||
|
Loading…
x
Reference in New Issue
Block a user