diff options
author | Robin McCorkell <rmccorkell@owncloud.com> | 2015-08-28 16:15:21 +0100 |
---|---|---|
committer | Robin McCorkell <rmccorkell@owncloud.com> | 2015-08-28 17:28:44 +0100 |
commit | f0c8cfa9a6a5db7134a2490cc562ff2623ce685d (patch) | |
tree | 6670e881866d4503fb96b4ba269e1e7edd7fe0af /apps/files_external/tests/controller/storagescontrollertest.php | |
parent | cc88c5f4b84da57c425cbdb7dc8b391b1942b503 (diff) | |
download | nextcloud-server-f0c8cfa9a6a5db7134a2490cc562ff2623ce685d.tar.gz nextcloud-server-f0c8cfa9a6a5db7134a2490cc562ff2623ce685d.zip |
Validate permissions for created admin storages, auth mechanism
Backend and auth mechanism permissions are checked on storage creation,
both for personal storages and for admin storages
Diffstat (limited to 'apps/files_external/tests/controller/storagescontrollertest.php')
-rw-r--r-- | apps/files_external/tests/controller/storagescontrollertest.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_external/tests/controller/storagescontrollertest.php b/apps/files_external/tests/controller/storagescontrollertest.php index 5a2cff99244..c43761f3bcb 100644 --- a/apps/files_external/tests/controller/storagescontrollertest.php +++ b/apps/files_external/tests/controller/storagescontrollertest.php @@ -75,6 +75,8 @@ abstract class StoragesControllerTest extends \Test\TestCase { $authMech = $this->getAuthMechMock(); $authMech->method('validateStorage') ->willReturn(true); + $authMech->method('isPermitted') + ->willReturn(true); $backend = $this->getBackendMock(); $backend->method('validateStorage') ->willReturn(true); @@ -114,6 +116,8 @@ abstract class StoragesControllerTest extends \Test\TestCase { $authMech = $this->getAuthMechMock(); $authMech->method('validateStorage') ->willReturn(true); + $authMech->method('isPermitted') + ->willReturn(true); $backend = $this->getBackendMock(); $backend->method('validateStorage') ->willReturn(true); @@ -245,6 +249,8 @@ abstract class StoragesControllerTest extends \Test\TestCase { $authMech = $this->getAuthMechMock(); $authMech->method('validateStorage') ->willReturn(true); + $authMech->method('isPermitted') + ->willReturn(true); $backend = $this->getBackendMock(); $backend->method('validateStorage') ->willReturn(true); @@ -338,6 +344,8 @@ abstract class StoragesControllerTest extends \Test\TestCase { $authMech = $this->getAuthMechMock(); $authMech->method('validateStorage') ->will($this->returnValue($authMechValidate)); + $authMech->method('isPermitted') + ->willReturn(true); $storageConfig = new StorageConfig(); $storageConfig->setMountPoint('mount'); |