Beispiel #1
0
 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;
 }