Signed-off-by: Georg Ehrke <developer@georgehrke.com>
return $this->caldavBackend->getPublishStatus($this);
}
- private function canWrite() {
+ public function canWrite() {
+ if ($this->getName() === BirthdayService::BIRTHDAY_CALENDAR_URI) {
+ return false;
+ }
+
if (isset($this->calendarInfo['{http://owncloud.org/ns}read-only'])) {
return !$this->calendarInfo['{http://owncloud.org/ns}read-only'];
}
});
$propFind->handle('{'.self::NS_CALENDARSERVER.'}allowed-sharing-modes', function() use ($node) {
- return new AllowedSharingModes(!$node->isSubscription(), !$node->isSubscription());
+ $canShare = (!$node->isSubscription() && $node->canWrite());
+ $canPublish = (!$node->isSubscription() && $node->canWrite());
+
+ return new AllowedSharingModes($canShare, $canPublish);
});
}
}