mirror of
https://github.com/flarum/framework.git
synced 2024-12-11 21:43:38 +08:00
parent
73c02f66e7
commit
d6691e6299
|
@ -69,7 +69,9 @@ class DiscussionPolicy extends AbstractPolicy
|
|||
*/
|
||||
public function find(User $actor, Builder $query)
|
||||
{
|
||||
if (! $actor->hasPermission('discussion.hide')) {
|
||||
if (! $actor->hasPermission('viewDiscussions')) {
|
||||
$query->whereRaw('FALSE');
|
||||
} elseif (! $actor->hasPermission('discussion.hide')) {
|
||||
$query->where(function ($query) use ($actor) {
|
||||
$query->whereNull('discussions.hide_time')
|
||||
->where('comments_count', '>', 0)
|
||||
|
|
Loading…
Reference in New Issue
Block a user