private function check($ability, User $user, Forum $forum)
 {
     return $forum->ability($ability, $user->id) || $user->ability($ability);
 }
示例#2
0
 private function check($ability, User $user, Post $post, Forum $forum)
 {
     return $user->id === $post->user_id || $forum->ability($ability, $user->id) || $user->ability($ability);
 }