diff options
author | Robin Appelman <robin@icewind.nl> | 2023-09-04 14:05:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-04 14:05:14 +0200 |
commit | 64f62f7cfd9c84090dcb78106ad692c5cb75ee20 (patch) | |
tree | ce1864c2425c4dcae22b9438352e1cff6ba44310 /apps/files_sharing/tests | |
parent | 489a57e9a382ac72ee46d8740506f4e8f607d131 (diff) | |
parent | e73889a24099091810a66623ded57346692ae2d6 (diff) | |
download | nextcloud-server-64f62f7cfd9c84090dcb78106ad692c5cb75ee20.tar.gz nextcloud-server-64f62f7cfd9c84090dcb78106ad692c5cb75ee20.zip |
Merge pull request #39863 from nextcloud/sharing-mask-wrapper
move share permission logic to storage wrapper
Diffstat (limited to 'apps/files_sharing/tests')
-rw-r--r-- | apps/files_sharing/tests/ApiTest.php | 4 | ||||
-rw-r--r-- | apps/files_sharing/tests/CapabilitiesTest.php | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php index 61a63ad1e19..f77a22dc0ad 100644 --- a/apps/files_sharing/tests/ApiTest.php +++ b/apps/files_sharing/tests/ApiTest.php @@ -36,6 +36,8 @@ namespace OCA\Files_Sharing\Tests; use OC\Files\Cache\Scanner; +use OC\Files\Filesystem; +use OC\Files\SetupManager; use OCA\Files_Sharing\Controller\ShareAPIController; use OCP\App\IAppManager; use OCP\AppFramework\OCS\OCSBadRequestException; @@ -74,6 +76,8 @@ class ApiTest extends TestCase { \OC::$server->getConfig()->setAppValue('core', 'shareapi_exclude_groups', 'no'); \OC::$server->getConfig()->setAppValue('core', 'shareapi_expire_after_n_days', '7'); + Filesystem::getLoader()->removeStorageWrapper('sharing_mask'); + $this->folder = self::TEST_FOLDER_NAME; $this->subfolder = '/subfolder_share_api_test'; $this->subsubfolder = '/subsubfolder_share_api_test'; diff --git a/apps/files_sharing/tests/CapabilitiesTest.php b/apps/files_sharing/tests/CapabilitiesTest.php index 0d21718f98a..1a3c416b10c 100644 --- a/apps/files_sharing/tests/CapabilitiesTest.php +++ b/apps/files_sharing/tests/CapabilitiesTest.php @@ -30,6 +30,7 @@ namespace OCA\Files_Sharing\Tests; use OC\KnownUser\KnownUserService; use OC\Share20\Manager; +use OC\Share20\ShareDisableChecker; use OCA\Files_Sharing\Capabilities; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\IRootFolder; @@ -94,7 +95,8 @@ class CapabilitiesTest extends \Test\TestCase { $this->createMock(\OC_Defaults::class), $this->createMock(IEventDispatcher::class), $this->createMock(IUserSession::class), - $this->createMock(KnownUserService::class) + $this->createMock(KnownUserService::class), + $this->createMock(ShareDisableChecker::class) ); $cap = new Capabilities($config, $shareManager); $result = $this->getFilesSharingPart($cap->getCapabilities()); |