]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix bug with shared_by for own calendars if shared 4060/head
authorGeorg Ehrke <developer@georgehrke.com>
Sat, 25 Mar 2017 22:07:09 +0000 (23:07 +0100)
committerGeorg Ehrke <developer@georgehrke.com>
Sat, 25 Mar 2017 22:07:09 +0000 (23:07 +0100)
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
apps/dav/lib/CalDAV/CalDavBackend.php
apps/dav/lib/CardDAV/CardDavBackend.php

index dbe86438238598a0a7fa13fc455f1b7ca41b218f..7976c1490ff31a48512cffd5481cbaea7ac935e0 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) {