summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2019-12-04 22:11:18 -0100
committerMaxence Lange <maxence@artificial-owl.com>2019-12-05 10:33:48 -0100
commit0f32f8119e1d27548732bb1468376959779c39cf (patch)
tree720585a60362ec44baafc7db3a9ad4dc1421c506 /apps
parentc1558af16da9126ad4da5db001bc5c8c92c8bc51 (diff)
downloadnextcloud-server-0f32f8119e1d27548732bb1468376959779c39cf.tar.gz
nextcloud-server-0f32f8119e1d27548732bb1468376959779c39cf.zip
using IShare::
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/Connector/PublicAuth.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/dav/lib/Connector/PublicAuth.php b/apps/dav/lib/Connector/PublicAuth.php
index 6b8341f7047..149ed62bfa0 100644
--- a/apps/dav/lib/Connector/PublicAuth.php
+++ b/apps/dav/lib/Connector/PublicAuth.php
@@ -34,6 +34,7 @@ use OCP\IRequest;
use OCP\ISession;
use OCP\Share\Exceptions\ShareNotFound;
use OCP\Share\IManager;
+use OCP\Share\IShare;
use Sabre\DAV\Auth\Backend\AbstractBasic;
/**
@@ -98,9 +99,9 @@ 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
- || $share->getShareType() === \OCP\Share::SHARE_TYPE_CIRCLE) {
+ if ($share->getShareType() === IShare::TYPE_LINK
+ || $share->getShareType() === IShare::TYPE_EMAIL
+ || $share->getShareType() === IShare::TYPE_CIRCLE) {
if ($this->shareManager->checkPassword($share, $password)) {
return true;
} else if ($this->session->exists('public_link_authenticated')
@@ -115,7 +116,7 @@ class PublicAuth extends AbstractBasic {
}
return false;
}
- } else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_REMOTE) {
+ } else if ($share->getShareType() === IShare::TYPE_REMOTE) {
return true;
} else {
return false;