aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2019-11-14 00:55:22 -0100
committerBackportbot <backportbot-noreply@rullzer.com>2019-12-11 11:41:20 +0000
commitb10ab5a11eb2f1a6cd7da49dde11ce6b10b0bcda (patch)
tree08b51a43d94b974885d56524993d4c780bbc7e73
parent796fbe1d43340d98e821027e718234e57325fa08 (diff)
downloadnextcloud-server-b10ab5a11eb2f1a6cd7da49dde11ce6b10b0bcda.tar.gz
nextcloud-server-b10ab5a11eb2f1a6cd7da49dde11ce6b10b0bcda.zip
adding share type circles
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-rw-r--r--apps/dav/lib/Connector/PublicAuth.php5
-rw-r--r--lib/private/Share20/Manager.php3
2 files changed, 6 insertions, 2 deletions
diff --git a/apps/dav/lib/Connector/PublicAuth.php b/apps/dav/lib/Connector/PublicAuth.php
index 8d29704c970..6b8341f7047 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 6c6ace237b9..7d64d0147a9 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;