]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix bug with shared_by for own calendars if shared 4301/head
authorGeorg Ehrke <developer@georgehrke.com>
Sat, 25 Mar 2017 22:07:09 +0000 (23:07 +0100)
committerLukas Reschke <lukas@statuscode.ch>
Tue, 11 Apr 2017 10:24:29 +0000 (12:24 +0200)
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
apps/dav/lib/CalDAV/CalDavBackend.php
apps/dav/lib/CardDAV/CardDavBackend.php

index b67e2339b67afd840c7ce98c753a614b4d9d4a29..631593974e7ada66fdb7e045c700a42ab38120c1 100644 (file)
@@ -279,6 +279,10 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
 
                $readOnlyPropertyName = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}read-only';
                while($row = $result->fetch()) {
+                       if ($row['principaluri'] === $principalUri) {
+                               continue;
+                       }
+
                        $readOnly = (int) $row['access'] === Backend::ACCESS_READ;
                        if (isset($calendars[$row['id']])) {
                                if ($readOnly) {
index 6f9a73298ef3ba483712d3a9abbe1b2d860579bd..397a77c1d1b5531df95fd38650e34aeef13466a9 100644 (file)
@@ -174,6 +174,10 @@ class CardDavBackend implements BackendInterface, SyncSupport {
 
                $readOnlyPropertyName = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}read-only';
                while($row = $result->fetch()) {
+                       if ($row['principaluri'] === $principalUri) {
+                               continue;
+                       }
+
                        $readOnly = (int) $row['access'] === Backend::ACCESS_READ;
                        if (isset($addressBooks[$row['id']])) {
                                if ($readOnly) {