summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Connector/LegacyDAVACL.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-12-15 16:59:46 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2017-01-02 15:02:18 +0100
commitdb3c918adb1aab5e493e2574505b4d87a112081c (patch)
treebeeae15a559f90c5d93c5d57fbe0eed69590e4ad /apps/dav/lib/Connector/LegacyDAVACL.php
parent3c34b8577c7f773bd697512b734062913940a3fd (diff)
downloadnextcloud-server-db3c918adb1aab5e493e2574505b4d87a112081c.tar.gz
nextcloud-server-db3c918adb1aab5e493e2574505b4d87a112081c.zip
Fix legacy caldav endpoints
* CaldavBackend is now endpoint aware (use old style principals on old endpoint and new onces on new). Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/dav/lib/Connector/LegacyDAVACL.php')
-rw-r--r--apps/dav/lib/Connector/LegacyDAVACL.php19
1 files changed, 2 insertions, 17 deletions
diff --git a/apps/dav/lib/Connector/LegacyDAVACL.php b/apps/dav/lib/Connector/LegacyDAVACL.php
index 83b08ec44fb..d5185ecd03b 100644
--- a/apps/dav/lib/Connector/LegacyDAVACL.php
+++ b/apps/dav/lib/Connector/LegacyDAVACL.php
@@ -33,24 +33,9 @@ use Sabre\DAVACL\Xml\Property\Principal;
class LegacyDAVACL extends DavAclPlugin {
/**
- * Converts the v1 principal `principal/<username>` to the new v2
- * `principal/users/<username>` which is required for permission checks
- *
* @inheritdoc
*/
- function getCurrentUserPrincipal() {
- $principalV1 = parent::getCurrentUserPrincipal();
- if (is_null($principalV1)) {
- return $principalV1;
- }
- return $this->convertPrincipal($principalV1, true);
- }
-
-
- /**
- * @inheritdoc
- */
- function getCurrentUserPrincipals() {
+ public function getCurrentUserPrincipals() {
$principalV2 = $this->getCurrentUserPrincipal();
if (is_null($principalV2)) return [];
@@ -73,7 +58,7 @@ class LegacyDAVACL extends DavAclPlugin {
return "principals/$name";
}
- function propFind(PropFind $propFind, INode $node) {
+ public function propFind(PropFind $propFind, INode $node) {
/* Overload current-user-principal */
$propFind->handle('{DAV:}current-user-principal', function () {
if ($url = parent::getCurrentUserPrincipal()) {