Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-06-11 15:19:15 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2018-06-20 09:53:37 +0300
commit20e514690c46c2874bd2819942b0beb46015027a (patch)
treeab13f88597b478c77c908521dc77f17083fb0752 /apps/files_sharing/lib/Middleware
parent31392c24434c8dfbe770cec93ccb3c209392334e (diff)
Don't allow public share pages if link sharing is disabled
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_sharing/lib/Middleware')
-rw-r--r--apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php25
1 files changed, 0 insertions, 25 deletions
diff --git a/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php b/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php
index 4ae63f63837..b5f1178b7f0 100644
--- a/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php
+++ b/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php
@@ -101,15 +101,6 @@ class SharingCheckMiddleware extends Middleware {
if ($controller instanceof ExternalSharesController &&
!$this->externalSharesChecks()) {
throw new S2SException('Federated sharing not allowed');
- } else if ($controller instanceof ShareController) {
- /*
- $token = $this->request->getParam('token');
- $share = $this->shareManager->getShareByToken($token);
- if ($share->getShareType() === \OCP\Share::SHARE_TYPE_LINK
- && !$this->isLinkSharingEnabled()) {
- throw new NotFoundException('Link sharing is disabled');
- }
- */
}
}
@@ -167,22 +158,6 @@ class SharingCheckMiddleware extends Middleware {
return true;
}
- /**
- * Check if link sharing is allowed
- * @return bool
- */
- private function isLinkSharingEnabled() {
- // Check if the shareAPI is enabled
- if ($this->config->getAppValue('core', 'shareapi_enabled', 'yes') !== 'yes') {
- return false;
- }
- // Check whether public sharing is enabled
- if($this->config->getAppValue('core', 'shareapi_allow_links', 'yes') !== 'yes') {
- return false;
- }
-
- return true;
- }
}