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