summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2017-04-10 11:00:19 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2017-04-10 17:18:13 +0200
commitcbacca4202eada659543974eac7bb5f2bb46c2b9 (patch)
tree0b3dd3e792b426157fb1564e45961c87cf23f405 /apps/files_sharing
parent235563f0a0481209f2e5d0303afe0b4db36bfcb6 (diff)
downloadnextcloud-server-cbacca4202eada659543974eac7bb5f2bb46c2b9.tar.gz
nextcloud-server-cbacca4202eada659543974eac7bb5f2bb46c2b9.zip
move capabilities to share by mail app
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib/Capabilities.php16
-rw-r--r--apps/files_sharing/tests/CapabilitiesTest.php4
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;
}