/**
  * @see	\wcf\page\IPage::checkPermissions()
  */
 public function checkPermissions()
 {
     parent::checkPermissions();
     if (!$this->file->canDownload()) {
         throw new PermissionDeniedException();
     }
 }
 /**
  * @see	\wcf\page\IPage::checkPermissions()
  */
 public function checkPermissions()
 {
     AbstractPage::checkPermissions();
     if ($this->attachment->tmpHash) {
         throw new PermissionDeniedException();
     }
     // check private status of attachment's object type
     $objectType = ObjectTypeCache::getInstance()->getObjectType($this->attachment->objectTypeID);
     if ($objectType->private) {
         throw new PermissionDeniedException();
     }
 }
 /**
  * @see	\wcf\page\IPage::checkPermissions()
  */
 public function checkPermissions()
 {
     parent::checkPermissions();
     if ($this->attachment->tmpHash) {
         if ($this->attachment->userID && $this->attachment->userID != WCF::getUser()->userID) {
             throw new IllegalLinkException();
         }
     } else {
         // check permissions
         if ($this->tiny || $this->thumbnail) {
             if (!$this->attachment->canViewPreview()) {
                 throw new PermissionDeniedException();
             }
         } else {
             if (!$this->attachment->canDownload()) {
                 throw new PermissionDeniedException();
             }
         }
     }
 }