summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-03-29 00:29:54 -0600
committerGitHub <noreply@github.com>2017-03-29 00:29:54 -0600
commitac7ca1c3a83f63a97b0fe94aed638160be9b9894 (patch)
treeae0eca369713f94339ecca87cf0326bad0570ec5
parent05f25963117f4829f5eae3c23d0e4c40cdbc0abf (diff)
parent896dd76ab52137e190eef4d4063ceb64e469bf9b (diff)
downloadnextcloud-server-ac7ca1c3a83f63a97b0fe94aed638160be9b9894.tar.gz
nextcloud-server-ac7ca1c3a83f63a97b0fe94aed638160be9b9894.zip
Merge pull request #4060 from nextcloud/shared_by_for_own_calendars
fix bug with shared_by for own calendars if shared
-rw-r--r--apps/dav/lib/CalDAV/CalDavBackend.php4
-rw-r--r--apps/dav/lib/CardDAV/CardDavBackend.php4
2 files changed, 8 insertions, 0 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php
index dbe86438238..7976c1490ff 100644
--- a/apps/dav/lib/CalDAV/CalDavBackend.php
+++ b/apps/dav/lib/CalDAV/CalDavBackend.php
@@ -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) {
diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php
index 6f9a73298ef..397a77c1d1b 100644
--- a/apps/dav/lib/CardDAV/CardDavBackend.php
+++ b/apps/dav/lib/CardDAV/CardDavBackend.php
@@ -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) {