From 4166a20a6d0813d796ef1568b641f256d93cde1d Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 4 May 2026 18:35:24 +0200 Subject: [PATCH] fix: improve check if external storage backend is local Signed-off-by: Robin Appelman # Conflicts: # apps/files_external/lib/Controller/GlobalStoragesController.php # apps/files_external/lib/Controller/StoragesController.php --- apps/files_external/lib/Controller/StoragesController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/files_external/lib/Controller/StoragesController.php b/apps/files_external/lib/Controller/StoragesController.php index 07afd0ceb44..e216539ceb0 100644 --- a/apps/files_external/lib/Controller/StoragesController.php +++ b/apps/files_external/lib/Controller/StoragesController.php @@ -9,6 +9,7 @@ namespace OCA\Files_External\Controller; use OCA\Files_External\Lib\Auth\AuthMechanism; use OCA\Files_External\Lib\Backend\Backend; +use OCA\Files_External\Lib\Backend\Local; use OCA\Files_External\Lib\InsufficientDataForMeaningfulAnswerException; use OCA\Files_External\Lib\StorageConfig; use OCA\Files_External\NotFoundException; @@ -78,7 +79,7 @@ abstract class StoragesController extends Controller { ?int $priority = null, ) { $canCreateNewLocalStorage = $this->config->getSystemValue('files_external_allow_create_new_local', true); - if (!$canCreateNewLocalStorage && $backend === 'local') { + if (!$canCreateNewLocalStorage && $this->backendService->getBackend($backend) instanceof Local) { return new DataResponse( [ 'message' => $this->l10n->t('Forbidden to manage local mounts')