1
0
mirror of https://github.com/flarum/core.git synced 2025-10-19 02:36:08 +02:00

Specify ambiguous column names

This commit is contained in:
Toby Zerner
2018-07-21 17:21:37 +09:30
parent ff7f7681c7
commit b4f6c4be1f
2 changed files with 4 additions and 4 deletions

View File

@@ -82,7 +82,7 @@ class PostPolicy extends AbstractPolicy
if (! $actor->hasPermission('discussion.editPosts')) {
$query->where(function ($query) use ($actor) {
$query->whereNull('posts.hidden_at')
->orWhere('user_id', $actor->id)
->orWhere('posts.user_id', $actor->id)
->orWhereExists(function ($query) use ($actor) {
$query->selectRaw('1')
->from('discussions')