fix: keep check for console users

This commit is contained in:
Mustaque Ahmed
2025-10-14 11:17:35 +05:30
parent 40de68a585
commit 0ee8c799fa
+2 -2
View File
@@ -557,8 +557,8 @@ App::init()
if ($useCache) {
$route = $utopia->match($request);
$isImageTransformation = $route->getPath() === '/v1/storage/buckets/:bucketId/files/:fileId/preview';
// Plan-level disable (legacy) - -1 means disabled
$isDisabled = isset($plan['imageTransformations']) && $plan['imageTransformations'] === -1;
$isDisabled = isset($plan['imageTransformations']) && $plan['imageTransformations'] === -1 && !Auth::isPrivilegedUser(Authorization::getRoles());
$key = $request->cacheIdentifier();
$cacheLog = Authorization::skip(fn () => $dbForProject->getDocument('cache', $key));