Skip to content
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

Checking for local external storage flag iff the method is local. #27621

Merged
merged 4 commits into from
Apr 12, 2017

Conversation

noveens
Copy link
Contributor

@noveens noveens commented Apr 11, 2017

Fixes #27619

Description

Regression from #27590

Related Issue

#27619

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@noveens
Copy link
Contributor Author

noveens commented Apr 11, 2017

sorry for the silly mistake @PVince81 😛

}

else {
if ($backend === 'local' && $canCreateNewLocalStorage === false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could remove this completely, users are never allowed to setup local storages for security reasons

@noveens
Copy link
Contributor Author

noveens commented Apr 11, 2017

@PVince81 , done.

@PVince81 PVince81 added this to the 10.0 milestone Apr 12, 2017
@PVince81
Copy link
Contributor

Tested, works.

Please fix the unit tests:

19:35:53 1) OCA\Files_External\Tests\Controller\GlobalStoragesControllerTest::testAddStorageWithoutConfig
19:35:53 OCP\Files\External\Service\IStoragesService::createStorage('mount', '\OCA\Files_External\Lib\Storage\SMB', '\OCA\Files_External\Lib\Auth\...hanism', Array (), Array (), Array (), Array (), null) was not expected to be called.
19:35:53 
19:35:53 /var/lib/jenkins/workspace/owncloud-core_core_PR-27621-QCHHOII2IVFMCUHAYJPIT6GBRSN6JJRAA5ZQSU6L5LKW7XNJQPCA@2/apps/files_external/lib/Controller/StoragesController.php:115
19:35:53 /var/lib/jenkins/workspace/owncloud-core_core_PR-27621-QCHHOII2IVFMCUHAYJPIT6GBRSN6JJRAA5ZQSU6L5LKW7XNJQPCA@2/apps/files_external/lib/Controller/GlobalStoragesController.php:99
19:35:53 /var/lib/jenkins/workspace/owncloud-core_core_PR-27621-QCHHOII2IVFMCUHAYJPIT6GBRSN6JJRAA5ZQSU6L5LKW7XNJQPCA@2/apps/files_external/tests/Controller/StoragesControllerTest.php:160
19:35:53 
19:35:53 2) OCA\Files_External\Tests\Controller\UserStoragesControllerTest::testAddStorageWithoutConfig
19:35:53 OCP\Files\External\Service\IStoragesService::createStorage('mount', '\OCA\Files_External\Lib\Storage\SMB', '\OCA\Files_External\Lib\Auth\...hanism', Array (), Array (), null, null, null) was not expected to be called.
19:35:53 
19:35:53 /var/lib/jenkins/workspace/owncloud-core_core_PR-27621-QCHHOII2IVFMCUHAYJPIT6GBRSN6JJRAA5ZQSU6L5LKW7XNJQPCA@2/apps/files_external/lib/Controller/StoragesController.php:115
19:35:53 /var/lib/jenkins/workspace/owncloud-core_core_PR-27621-QCHHOII2IVFMCUHAYJPIT6GBRSN6JJRAA5ZQSU6L5LKW7XNJQPCA@2/apps/files_external/lib/Controller/UserStoragesController.php:129
19:35:53 /var/lib/jenkins/workspace/owncloud-core_core_PR-27621-QCHHOII2IVFMCUHAYJPIT6GBRSN6JJRAA5ZQSU6L5LKW7XNJQPCA@2/apps/files_external/tests/Controller/StoragesControllerTest.php:160

@noveens
Copy link
Contributor Author

noveens commented Apr 12, 2017

@PVince81 ,
I have updated the test, and the test requires the check condition here as well :
https://github.com/owncloud/core/pull/27621/files#diff-432f5e183c311067085bd0348a8191fcR131

@PVince81
Copy link
Contributor

Tested, works 👍

Let's wait for CI now

@noveens
Copy link
Contributor Author

noveens commented Apr 12, 2017

@PVince81 ,
Jenkins passed 😃
Merge?

@PVince81 PVince81 merged commit b526666 into master Apr 12, 2017
@PVince81 PVince81 deleted the cannot_create_external_storage branch April 12, 2017 16:00
@lock
Copy link

lock bot commented Aug 3, 2019

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.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot create any external storage without local flag
2 participants