Commit d4c5dcc2 authored by Christian Rost's avatar Christian Rost Committed by Vincent Petry
Browse files

Created a config.php option to disable local mounts for files_external (#26990)

* fixed #26887

* fix identation
parent 44b3c792
......@@ -80,7 +80,6 @@ class Application extends App implements IBackendProvider, IAuthMechanismProvide
$container = $this->getContainer();
$backends = [
$container->query('OCA\Files_External\Lib\Backend\Local'),
$container->query('OCA\Files_External\Lib\Backend\DAV'),
$container->query('OCA\Files_External\Lib\Backend\OwnCloud'),
$container->query('OCA\Files_External\Lib\Backend\SFTP'),
......@@ -93,6 +92,11 @@ class Application extends App implements IBackendProvider, IAuthMechanismProvide
$container->query('OCA\Files_External\Lib\Backend\SMB_OC'),
];
$this->allowLocalMounts = \OC::$server->getConfig()->getSystemValue('files_external_allow_local', true);
if ($this->allowLocalMounts === true) {
$backends[] = $container->query('OCA\Files_External\Lib\Backend\Local');
};
return $backends;
}
......
......@@ -1298,6 +1298,13 @@ $CONFIG = array(
*/
'data-fingerprint' => '',
/**
* Set this property to false if you want to disable the files_external local mount Option.
* Default: true
*
*/
'files_external_allow_local' => true,
/**
* This entry is just here to show a warning in case somebody copied the sample
* configuration. DO NOT ADD THIS SWITCH TO YOUR CONFIGURATION!
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment