summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2023-09-06 10:27:55 +0200
committerGitHub <noreply@github.com>2023-09-06 10:27:55 +0200
commit801c5556f4560846ee7274824f432197acd2d291 (patch)
treec9146ca493684b5645caf50aba18efb20dc91eef /apps
parentb956f0ffd2497f2cacd54a6a818a0d466b30e2d5 (diff)
parentfc21ecbd2afb6c0097bcd9a3ce896912e1229ac6 (diff)
downloadnextcloud-server-801c5556f4560846ee7274824f432197acd2d291.tar.gz
nextcloud-server-801c5556f4560846ee7274824f432197acd2d291.zip
Merge pull request #40231 from nextcloud/sharing-mask-wrapper-27
[27] move share permission logic to storage wrapper
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/tests/ApiTest.php4
-rw-r--r--apps/files_sharing/tests/CapabilitiesTest.php4
2 files changed, 7 insertions, 1 deletions
diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php
index d7661297e9e..3484bb29d94 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 fcefc556203..294bbba7d90 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;
@@ -96,7 +97,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());