fix bug with shared_by for own calendars if shared

Signed-off-by: Georg Ehrke <developer@georgehrke.com>
This commit is contained in:
Georg Ehrke 2017-03-25 23:07:09 +01:00 committed by Lukas Reschke
parent baa0b3235c
commit bc67585f3e
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
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) {