diff options
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/lib/Capabilities.php | 16 | ||||
-rw-r--r-- | apps/files_sharing/tests/CapabilitiesTest.php | 4 |
2 files changed, 2 insertions, 18 deletions
diff --git a/apps/files_sharing/lib/Capabilities.php b/apps/files_sharing/lib/Capabilities.php index ed00cdc00a6..22a8a8a0a3d 100644 --- a/apps/files_sharing/lib/Capabilities.php +++ b/apps/files_sharing/lib/Capabilities.php @@ -21,7 +21,6 @@ */ namespace OCA\Files_Sharing; -use OCP\App\IAppManager; use OCP\Capabilities\ICapability; use \OCP\IConfig; @@ -35,12 +34,8 @@ class Capabilities implements ICapability { /** @var IConfig */ private $config; - /** @var IAppManager */ - private $appManager; - - public function __construct(IConfig $config, IAppManager $appManager) { + public function __construct(IConfig $config) { $this->config = $config; - $this->appManager = $appManager; } /** @@ -99,15 +94,6 @@ class Capabilities implements ICapability { 'expire_date' => ['enabled' => true] ]; - if ($this->appManager->isEnabledForUser('sharebymail')) { - $res['mailshare'] = [ - 'enabled' => true, - 'upload_files_drop' => ['enabled' => true], - 'password' => ['enabled' => true], - 'expire_date' => ['enabled' => true] - ]; - } - return [ 'files_sharing' => $res, ]; diff --git a/apps/files_sharing/tests/CapabilitiesTest.php b/apps/files_sharing/tests/CapabilitiesTest.php index 79ac1854e40..663adc1f271 100644 --- a/apps/files_sharing/tests/CapabilitiesTest.php +++ b/apps/files_sharing/tests/CapabilitiesTest.php @@ -57,9 +57,7 @@ class CapabilitiesTest extends \Test\TestCase { private function getResults(array $map) { $config = $this->getMockBuilder('\OCP\IConfig')->disableOriginalConstructor()->getMock(); $config->method('getAppValue')->will($this->returnValueMap($map)); - $appManager = $this->getMockBuilder(IAppManager::class)->getMock(); - $appManager->expects($this->any())->method('isEnabledForUser')->with('sharebymail')->willReturn(true); - $cap = new Capabilities($config, $appManager); + $cap = new Capabilities($config); $result = $this->getFilesSharingPart($cap->getCapabilities()); return $result; } |