adding share type circles

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
This commit is contained in:
Maxence Lange 2019-11-14 00:55:22 -01:00 committed by Backportbot
parent 624302d99a
commit 1420cd5a7e
2 changed files with 6 additions and 2 deletions

View 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')

View file

@ -1330,7 +1330,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;