/** * Determines if the files are hosted locally (shared or not) and can be used by the preview * system * * isMounted() doesn't include externally hosted shares, so we need to exclude those from the * non-mounted nodes * * @param Node $node * * @return bool */ protected function isAllowedAndAvailable($node) { try { if (!$node->isMounted()) { return $this->isAllowed($node) && $this->isAvailable($node); } } catch (\Exception $exception) { $message = 'The folder is not available: ' . $exception->getMessage(); $this->logger->error($message); return false; } return false; }
/** * Determines if the files are hosted locally (shared or not) * * isMounted() doesn't include externally hosted shares, so we need to exclude those from the * non-mounted nodes * * @param Node $node * * @return bool */ protected function isAllowedAndAvailable($node) { try { if (!$node->isMounted()) { $allowed = $node->isReadable(); if ($this->isExternalShare($node)) { $allowed = $allowed && $this->isExternalShareAllowed(); } return $allowed; } } catch (\Exception $exception) { $message = 'The folder is not available: ' . $exception->getMessage(); $this->logger->error($message); return false; } return false; }