From b73faad2a1890a9f9154cc8f7dcd18c489c5fd0c Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Thu, 14 Nov 2019 00:55:22 -0100 Subject: [PATCH] adding share type circles Signed-off-by: Maxence Lange --- apps/dav/lib/Connector/PublicAuth.php | 5 ++++- lib/private/Share20/Manager.php | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/dav/lib/Connector/PublicAuth.php b/apps/dav/lib/Connector/PublicAuth.php index 8d29704c97..6b8341f704 100644 --- a/apps/dav/lib/Connector/PublicAuth.php +++ b/apps/dav/lib/Connector/PublicAuth.php @@ -97,7 +97,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() === \OCP\Share::SHARE_TYPE_LINK + || $share->getShareType() === \OCP\Share::SHARE_TYPE_EMAIL + || $share->getShareType() === \OCP\Share::SHARE_TYPE_CIRCLE) { if ($this->shareManager->checkPassword($share, $password)) { return true; } else if ($this->session->exists('public_link_authenticated') diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index c8aafd9765..dd983b6c7b 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -1329,7 +1329,8 @@ class Manager implements IManager { */ public function checkPassword(\OCP\Share\IShare $share, $password) { $passwordProtected = $share->getShareType() !== \OCP\Share::SHARE_TYPE_LINK - || $share->getShareType() !== \OCP\Share::SHARE_TYPE_EMAIL; + || $share->getShareType() !== \OCP\Share::SHARE_TYPE_EMAIL + || $share->getShareType() !== \OCP\Share::SHARE_TYPE_CIRCLE; if (!$passwordProtected) { //TODO maybe exception? return false;