Merge pull request #4301 from nextcloud/stable11-shared_by_for_own_calendars

[stable11] fix bug with shared_by for own calendars if shared
This commit is contained in:
Lukas Reschke 2017-04-11 14:39:22 +02:00 committed by GitHub
commit cb4b8d2287
2 changed files with 8 additions and 0 deletions

View 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) {

View 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) {