summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib/external/storage.php7
-rw-r--r--apps/files_sharing/lib/sharedstorage.php2
2 files changed, 8 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/external/storage.php
index dc8d1738b05..b357bf3b7f6 100644
--- a/apps/files_sharing/lib/external/storage.php
+++ b/apps/files_sharing/lib/external/storage.php
@@ -258,4 +258,11 @@ class Storage extends DAV implements ISharedStorage {
return json_decode($response->getBody(), true);
}
+
+ public function isSharable($path) {
+ if (\OCP\Util::isSharingDisabledForUser() || !\OC\Share\Share::isResharingAllowed()) {
+ return false;
+ }
+ return ($this->getPermissions($path) & \OCP\Constants::PERMISSION_SHARE);
+ }
}
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index ab172037b6c..be9809e135c 100644
--- a/apps/files_sharing/lib/sharedstorage.php
+++ b/apps/files_sharing/lib/sharedstorage.php
@@ -247,7 +247,7 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
}
public function isSharable($path) {
- if (\OCP\Util::isSharingDisabledForUser()) {
+ if (\OCP\Util::isSharingDisabledForUser() || !\OC\Share\Share::isResharingAllowed()) {
return false;
}
return ($this->getPermissions($path) & \OCP\Constants::PERMISSION_SHARE);