Skip to content

Commit d3c98a7

Browse files
committed
Fix default post deletion policy method
1 parent b46766e commit d3c98a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Policies/PostPolicy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ public function edit($user, Post $post)
2626
*/
2727
public function delete($user, Post $post)
2828
{
29-
return Gate::forUser($user)->allows('deletePosts', $post->thread) || $user->getKey() === $post->user_id;
29+
return Gate::forUser($user)->allows('deletePosts', $post->thread) || $user->getKey() === $post->author_id;
3030
}
3131
}

0 commit comments

Comments
 (0)