private function requireComment($id) { if (!($comment = \StudipComment::find($id))) { $this->notFound("Comment not found"); } if (!$comment->news->havePermission('view', '', $GLOBALS['user']->id)) { $this->error(401); } return $comment; }
private function requireComment($id) { if (!($comment = \StudipComment::find($id))) { $this->notFound("Comment not found"); } if (!$comment->news->havePermission('view', '', $GLOBALS['user']->id)) { $this->error(401); } return $comment; }