mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
fix: improve check if external storage backend is local
Signed-off-by: Robin Appelman <robin@icewind.nl> # Conflicts: # apps/files_external/lib/Controller/GlobalStoragesController.php # apps/files_external/lib/Controller/StoragesController.php
This commit is contained in:
parent
728ee257b3
commit
4166a20a6d
1 changed files with 2 additions and 1 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Reference in a new issue