aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Connector
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-12-11 12:37:54 +0100
committerGitHub <noreply@github.com>2019-12-11 12:37:54 +0100
commit97deaf85b9d18cabfc345025ef273da24006c6de (patch)
treefbef8a1bc9026f9c7e967f7e6f87db630c6437b6 /apps/dav/lib/Connector
parentc71e9de5ff3fe88d0798b70b5bde5caa03e51c3a (diff)
parent0f32f8119e1d27548732bb1468376959779c39cf (diff)
downloadnextcloud-server-97deaf85b9d18cabfc345025ef273da24006c6de.tar.gz
nextcloud-server-97deaf85b9d18cabfc345025ef273da24006c6de.zip
Merge pull request #17935 from nextcloud/feature/noid/public-auth-for-circles
adding share type circles
Diffstat (limited to 'apps/dav/lib/Connector')
-rw-r--r--apps/dav/lib/Connector/PublicAuth.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/dav/lib/Connector/PublicAuth.php b/apps/dav/lib/Connector/PublicAuth.php
index 8732ae3b3c9..9e1771947da 100644
--- a/apps/dav/lib/Connector/PublicAuth.php
+++ b/apps/dav/lib/Connector/PublicAuth.php
@@ -34,6 +34,7 @@ use OCP\IRequest;
use OCP\ISession;
use OCP\Share\Exceptions\ShareNotFound;
use OCP\Share\IManager;
+use OCP\Share\IShare;
use Sabre\DAV\Auth\Backend\AbstractBasic;
/**
@@ -97,7 +98,10 @@ class PublicAuth extends AbstractBasic {
// check if the share is password protected
if ($share->getPassword() !== null) {
- if ($share->getShareType() === \OCP\Share::SHARE_TYPE_LINK || $share->getShareType() === \OCP\Share::SHARE_TYPE_EMAIL) {
+
+ if ($share->getShareType() === IShare::TYPE_LINK
+ || $share->getShareType() === IShare::TYPE_EMAIL
+ || $share->getShareType() === IShare::TYPE_CIRCLE) {
if ($this->shareManager->checkPassword($share, $password)) {
return true;
} else if ($this->session->exists('public_link_authenticated')
@@ -112,7 +116,7 @@ class PublicAuth extends AbstractBasic {
}
return false;
}
- } else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_REMOTE) {
+ } else if ($share->getShareType() === IShare::TYPE_REMOTE) {
return true;
} else {
return false;