shareManager->getShareByToken($this->publicSharingToken); } catch (ShareNotFound) { throw new NotFoundException(); } $this->share = $share; $node = $share->getNode(); if ($node instanceof File) { return $node; } $node = $node->getFirstNodeById($this->fileId); if ($node instanceof File) { return $node; } throw new InvalidArgumentException('No proper share data'); } #[\Override] public function isFileReadOnly(): bool { if ($this->share === null) { throw new InvalidArgumentException('No share data'); } return !($this->share->getPermissions() & Constants::PERMISSION_UPDATE); } }