/**
  * @see	\wcf\system\comment\manager\ICommentManager::isAccessible()
  */
 public function isAccessible($objectID, $validateWritePermission = false)
 {
     // check object id
     $entry = new Entry($objectID);
     if (!$entry->entryID || !$entry->canRead()) {
         return false;
     }
     return true;
 }
 /**
  * @see	\wcf\system\attachment\IAttachmentObjectType::canViewPreview()
  */
 public function canViewPreview($objectID)
 {
     if ($objectID) {
         $entry = new Entry($objectID);
         if (!$entry->canRead()) {
             return false;
         }
         return WCF::getSession()->getPermission('user.filebase.canViewScreenshot');
     }
     return false;
 }
 /**
  * @see	\wcf\system\user\object\watch\IUserObjectWatch::validateObjectID()
  */
 public function validateObjectID($objectID)
 {
     // get entry
     $entry = new Entry($objectID);
     if (!$entry->entryID) {
         throw new IllegalLinkException();
     }
     // check permission
     if (!$entry->canRead()) {
         throw new PermissionDeniedException();
     }
 }
 /**
  * Validates parameters to load files.
  */
 public function validateLoad()
 {
     $this->readInteger('entryID');
     $this->readInteger('offset');
     // validate entry
     $this->entry = new Entry($this->parameters['entryID']);
     if (!$this->entry->entryID) {
         throw new UserInputException('entryID');
     } else {
         if (!$this->entry->canRead()) {
             throw new PermissionDeniedException();
         }
     }
 }