Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13d32a6b authored by Fahim Salam Chowdhury's avatar Fahim Salam Chowdhury 👽
Browse files

rnd: return 503 from cacheWrapper

parent 534bb36d
Loading
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@ use OC\Files\Cache\Wrapper\CacheWrapper as Wrapper;
use OCP\Constants;
use OCP\Files\Cache\ICache;
use OCP\Files\Cache\ICacheEntry;
use OCP\Files\ForbiddenException;
use OCP\Files\Search\ISearchQuery;

class CacheWrapper extends Wrapper {
@@ -27,8 +26,8 @@ class CacheWrapper extends Wrapper {
	protected function formatCacheEntry($entry) {
		if (isset($entry['path']) && isset($entry['permissions'])) {
			try {
				throw new ForbiddenException('Access denied', false);
			} catch (ForbiddenException) {
				throw new \Exception('Access denied', 503);
			} catch (\Exception) {
				$entry['permissions'] &= $this->mask;
			}
		}
@@ -36,15 +35,15 @@ class CacheWrapper extends Wrapper {
	}

	public function insert($file, $data) {
		throw new \Exception('User data cache insert is disabled.');
		throw new \Exception('User data cache insert is disabled.', 503);
	}

	public function update($id, $data) {
		throw new \Exception('User data cache update is disabled.');
		throw new \Exception('User data cache update is disabled.', 503);
	}

	public function remove($fileId) {
		throw new \Exception('User data cache removal is disabled.');
		throw new \Exception('User data cache removal is disabled.', 503);
	}

	public function searchQuery(ISearchQuery $searchQuery) {