diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-04-11 15:39:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-11 15:39:22 +0300 |
commit | cb4b8d22878bc61e242f723b388da96cb9527ddb (patch) | |
tree | c40937cd996549bf82da04febf72a259e690adc8 | |
parent | baa0b3235c428f3a79598d832860822266fd6b9f (diff) | |
parent | bc67585f3eb7f536a03818764c4a95dfccdff725 (diff) |
Merge pull request #4301 from nextcloud/stable11-shared_by_for_own_calendars
[stable11] fix bug with shared_by for own calendars if shared
-rw-r--r-- | apps/dav/lib/CalDAV/CalDavBackend.php | 4 | ||||
-rw-r--r-- | apps/dav/lib/CardDAV/CardDavBackend.php | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index b67e2339b67..631593974e7 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) { |