Skip to content

Commit b73faad

Browse files
ArtificialOwlBackportbot
authored andcommitted
adding share type circles
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
1 parent cdd0e4d commit b73faad

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

apps/dav/lib/Connector/PublicAuth.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ protected function validateUserPass($username, $password) {
9797

9898
// check if the share is password protected
9999
if ($share->getPassword() !== null) {
100-
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_LINK || $share->getShareType() === \OCP\Share::SHARE_TYPE_EMAIL) {
100+
101+
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_LINK
102+
|| $share->getShareType() === \OCP\Share::SHARE_TYPE_EMAIL
103+
|| $share->getShareType() === \OCP\Share::SHARE_TYPE_CIRCLE) {
101104
if ($this->shareManager->checkPassword($share, $password)) {
102105
return true;
103106
} else if ($this->session->exists('public_link_authenticated')

lib/private/Share20/Manager.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,8 @@ protected function checkExpireDate($share) {
13291329
*/
13301330
public function checkPassword(\OCP\Share\IShare $share, $password) {
13311331
$passwordProtected = $share->getShareType() !== \OCP\Share::SHARE_TYPE_LINK
1332-
|| $share->getShareType() !== \OCP\Share::SHARE_TYPE_EMAIL;
1332+
|| $share->getShareType() !== \OCP\Share::SHARE_TYPE_EMAIL
1333+
|| $share->getShareType() !== \OCP\Share::SHARE_TYPE_CIRCLE;
13331334
if (!$passwordProtected) {
13341335
//TODO maybe exception?
13351336
return false;

0 commit comments

Comments
 (0)