Loading lib/AppInfo/Application.php +3 −1 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ declare(strict_types=1); namespace OCA\EcloudAccounts\AppInfo; use OC\Files\Filesystem; use OCA\EcloudAccounts\Filesystem\StorageWrapper; use OCA\EcloudAccounts\Listeners\BeforeTemplateRenderedListener; use OCA\EcloudAccounts\Listeners\BeforeUserDeletedListener; Loading @@ -40,6 +41,7 @@ use OCP\AppFramework\Bootstrap\IBootContext; use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Bootstrap\IRegistrationContext; use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent; use OCP\Files\Storage\IStorage; use OCP\IUserManager; use OCP\User\Events\BeforeUserDeletedEvent; use OCP\User\Events\PasswordUpdatedEvent; Loading Loading @@ -87,7 +89,7 @@ class Application extends App implements IBootstrap { * @return StorageWrapper|IStorage */ public function addStorageWrapperCallback($mountPoint, IStorage $storage) { if (!OC::$CLI && $mountPoint !== '/') { if (!\OC::$CLI && $mountPoint !== '/') { return new StorageWrapper([ 'storage' => $storage, 'mountPoint' => $mountPoint, Loading lib/Filesystem/CacheWrapper.php +5 −8 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ namespace OCA\EcloudAccounts\Filesystem; use OC\Files\Cache\Wrapper\CacheWrapper as Wrapper; use OCP\Constants; use OCP\Files\Cache\ICache; use OCP\Files\ForbiddenException; class CacheWrapper extends Wrapper { Loading @@ -24,7 +25,7 @@ class CacheWrapper extends Wrapper { protected function formatCacheEntry($entry) { if (isset($entry['path']) && isset($entry['permissions'])) { try { throw new ForbiddenException('Access denied'); throw new ForbiddenException('Access denied', false); } catch (ForbiddenException) { $entry['permissions'] &= $this->mask; } Loading @@ -32,19 +33,15 @@ class CacheWrapper extends Wrapper { return $entry; } public function get($fileId) { throw new OCP\Files\Cache\CacheEntryNotFoundException('User data cache access is disabled.'); } public function insert($file, $data) { throw new \OCP\Files\Cache\CacheUpdateForbiddenException('User data cache insert is disabled.'); throw new \Exception('User data cache insert is disabled.'); } public function update($id, $data) { throw new \OCP\Files\Cache\CacheUpdateForbiddenException('User data cache update is disabled.'); throw new \Exception('User data cache update is disabled.'); } public function remove($fileId) { throw new \OCP\Files\Cache\CacheUpdateForbiddenException('User data cache removal is disabled.'); throw new \Exception('User data cache removal is disabled.'); } } lib/Filesystem/StorageWrapper.php +1 −1 Original line number Diff line number Diff line Loading @@ -213,7 +213,7 @@ class StorageWrapper extends Wrapper implements IWriteStreamStorage { $storage = $this; } $cache = $this->storage->getCache($path, $storage); return new CacheWrapper($cache, $storage, $this->operation); return new CacheWrapper($cache, $storage); } /** Loading Loading
lib/AppInfo/Application.php +3 −1 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ declare(strict_types=1); namespace OCA\EcloudAccounts\AppInfo; use OC\Files\Filesystem; use OCA\EcloudAccounts\Filesystem\StorageWrapper; use OCA\EcloudAccounts\Listeners\BeforeTemplateRenderedListener; use OCA\EcloudAccounts\Listeners\BeforeUserDeletedListener; Loading @@ -40,6 +41,7 @@ use OCP\AppFramework\Bootstrap\IBootContext; use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Bootstrap\IRegistrationContext; use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent; use OCP\Files\Storage\IStorage; use OCP\IUserManager; use OCP\User\Events\BeforeUserDeletedEvent; use OCP\User\Events\PasswordUpdatedEvent; Loading Loading @@ -87,7 +89,7 @@ class Application extends App implements IBootstrap { * @return StorageWrapper|IStorage */ public function addStorageWrapperCallback($mountPoint, IStorage $storage) { if (!OC::$CLI && $mountPoint !== '/') { if (!\OC::$CLI && $mountPoint !== '/') { return new StorageWrapper([ 'storage' => $storage, 'mountPoint' => $mountPoint, Loading
lib/Filesystem/CacheWrapper.php +5 −8 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ namespace OCA\EcloudAccounts\Filesystem; use OC\Files\Cache\Wrapper\CacheWrapper as Wrapper; use OCP\Constants; use OCP\Files\Cache\ICache; use OCP\Files\ForbiddenException; class CacheWrapper extends Wrapper { Loading @@ -24,7 +25,7 @@ class CacheWrapper extends Wrapper { protected function formatCacheEntry($entry) { if (isset($entry['path']) && isset($entry['permissions'])) { try { throw new ForbiddenException('Access denied'); throw new ForbiddenException('Access denied', false); } catch (ForbiddenException) { $entry['permissions'] &= $this->mask; } Loading @@ -32,19 +33,15 @@ class CacheWrapper extends Wrapper { return $entry; } public function get($fileId) { throw new OCP\Files\Cache\CacheEntryNotFoundException('User data cache access is disabled.'); } public function insert($file, $data) { throw new \OCP\Files\Cache\CacheUpdateForbiddenException('User data cache insert is disabled.'); throw new \Exception('User data cache insert is disabled.'); } public function update($id, $data) { throw new \OCP\Files\Cache\CacheUpdateForbiddenException('User data cache update is disabled.'); throw new \Exception('User data cache update is disabled.'); } public function remove($fileId) { throw new \OCP\Files\Cache\CacheUpdateForbiddenException('User data cache removal is disabled.'); throw new \Exception('User data cache removal is disabled.'); } }
lib/Filesystem/StorageWrapper.php +1 −1 Original line number Diff line number Diff line Loading @@ -213,7 +213,7 @@ class StorageWrapper extends Wrapper implements IWriteStreamStorage { $storage = $this; } $cache = $this->storage->getCache($path, $storage); return new CacheWrapper($cache, $storage, $this->operation); return new CacheWrapper($cache, $storage); } /** Loading