Ejemplo n.º 1
0
 /**
  * @param FileEvent $event
  */
 public function doPermissionsCheck(FileEvent $event)
 {
     if ($this->adapter->isFileReadableByAnonymous($event->getFile())) {
         return;
     }
     $this->publisher->unpublishAllVersions($event->getFile());
 }
Ejemplo n.º 2
0
 public function checkFileAnonymousRead(FileEvent $event)
 {
     $file = $event->getFile();
     if (!$this->adapter->isFileReadableByAnonymous($file)) {
         $this->dispatchDenyEvent($file);
         throw $this->createAccessDeniedException($file, 'anonymous read');
     }
 }