]> source.dussan.org Git - nextcloud-server.git/commitdiff
adding share type circles 18357/head
authorMaxence Lange <maxence@artificial-owl.com>
Thu, 14 Nov 2019 01:55:22 +0000 (00:55 -0100)
committerBackportbot <backportbot-noreply@rullzer.com>
Wed, 11 Dec 2019 11:41:20 +0000 (11:41 +0000)
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
apps/dav/lib/Connector/PublicAuth.php
lib/private/Share20/Manager.php

index 8d29704c970692ffc9507e3a45c0fc994b257cc8..6b8341f70470ecb417e6e5ec7ccd56a2d774cdf5 100644 (file)
@@ -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')
index 6c6ace237b931e4b5ab61b452d7b7a6e2f082b74..7d64d0147a990e92404ac84df3f60bd9d1a494bc 100644 (file)
@@ -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;