summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-03-17 20:51:54 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-03-17 20:51:54 +0100
commitd6d59fe2272fc9914581eec69779c3389560b79b (patch)
treefaab9977bfb35364a75741d18dacaf964df697a2 /apps
parent876e032d09f60844f02289a4909d310c4ecf7081 (diff)
parent533fdb4075a1dc41ba10bdbc3782d92ff088bbbb (diff)
downloadnextcloud-server-d6d59fe2272fc9914581eec69779c3389560b79b.tar.gz
nextcloud-server-d6d59fe2272fc9914581eec69779c3389560b79b.zip
Merge pull request #23346 from owncloud/fix_23325
Set proper public webdav permissions when public upload disabled
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/connector/publicauth.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/dav/lib/connector/publicauth.php b/apps/dav/lib/connector/publicauth.php
index 3d800e88004..f069a214fe8 100644
--- a/apps/dav/lib/connector/publicauth.php
+++ b/apps/dav/lib/connector/publicauth.php
@@ -61,6 +61,11 @@ class PublicAuth extends \Sabre\DAV\Auth\Backend\AbstractBasic {
return false;
}
+ if ((int)$linkItem['share_type'] === \OCP\Share::SHARE_TYPE_LINK &&
+ $this->config->getAppValue('core', 'shareapi_allow_public_upload', 'yes') !== 'yes') {
+ $this->share['permissions'] &= ~(\OCP\Constants::PERMISSION_CREATE | \OCP\Constants::PERMISSION_UPDATE);
+ }
+
// check if the share is password protected
if (isset($linkItem['share_with'])) {
if ($linkItem['share_type'] == \OCP\Share::SHARE_TYPE_LINK) {