-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Created a config.php option to disable local mounts for files_externa… #26887
Conversation
@grischdian, thanks for your PR! By analyzing the history of the files in this pull request, we identified @carlaschroder, @butonic, @PVince81 and @Xenopathic to be potential reviewers. |
@carlaschroder, @butonic, @PVince81 and @Xenopathic can someone explain why jenkins is failing? If I click on Details I got a "unable to connect" error |
]; | ||
]; | ||
|
||
$this->denyLocalMounts = \OC::$server->getConfig()->getSystemValue('files_external_deny_local', 'false'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will return the string 'false'. What you want is ..., false);
regarding jenkins:
|
@butonic that issue should disappear after rebasing onto master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great addition, thanks.
Please fix the indent and this should be good to go.
|
||
if ($this->denyLocalMounts !== true) { | ||
$backends[] = $container->query('OCA\Files_External\Lib\Backend\Local'); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix indentation, in ownCloud we use tabs, not spaces.
@@ -93,6 +92,11 @@ public function getBackends() { | |||
$container->query('OCA\Files_External\Lib\Backend\SMB_OC'), | |||
]; | |||
|
|||
$this->denyLocalMounts = \OC::$server->getConfig()->getSystemValue('files_external_deny_local', false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be better to call it allowLocalMounts
with a default of true
to avoid multiple negations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@grischdian if you have time, please rename it to allowLocalMounts
. I also prefer to avoid the double negative 😄
Setting back to "Developing" then |
will take care today |
I messed up my branch during changing from deny to allow - I close this PR - will open a new one. sorry |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
…l. fixing #26653
Description
As in #26653 mentioned an option would be good to disable the 'local' option from files_external.
There is now a new Option for config.php called 'files_external_deny_local' which is set to false on default. Only if you set the option to true then the local Backend will not get registered.
Related Issue
#26653
Motivation and Context
If Sysadmin and oCadmin are not the same the Sysadmin may want to disable the local mount feature for security reasons.
How Has This Been Tested?
Compiled the actual master, installed php56 and apach24 on centos7 (Softwarecollection)
Tested without setting the option in config.php, tested with the option set to false and set to true.
Screenshots (if appropriate):
Types of changes
Checklist:
Line maybe to long - but have no shorter idea