File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
apps/dav/lib/CalDAV/Publishing Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -130,15 +130,15 @@ public function propFind(PropFind $propFind, INode $node) {
130130 });
131131
132132 $ propFind ->handle ('{ ' .self ::NS_CALENDARSERVER .'}allowed-sharing-modes ' , function () use ($ node ) {
133+ $ canShare = (!$ node ->isSubscription () && $ node ->canWrite ());
134+ $ canPublish = (!$ node ->isSubscription () && $ node ->canWrite ());
135+
133136 if ($ this ->config ->getAppValue ('dav ' , 'limitAddressBookAndCalendarSharingToOwner ' , 'no ' ) === 'yes ' ) {
134- $ canShare = (!$ node ->isSubscription () && $ node ->getOwner () === $ node ->getPrincipalURI ());
135- $ canPublish = (!$ node ->isSubscription () && $ node ->getOwner () === $ node ->getPrincipalURI ());
136- } else {
137- $ canShare = (!$ node ->isSubscription () && $ node ->canWrite ());
138- $ canPublish = (!$ node ->isSubscription () && $ node ->canWrite ());
137+ $ canShare &= ($ node ->getOwner () === $ node ->getPrincipalURI ());
138+ $ canPublish &= ($ node ->getOwner () === $ node ->getPrincipalURI ());
139139 }
140140
141- return new AllowedSharingModes ($ canShare , $ canPublish );
141+ return new AllowedSharingModes (( bool ) $ canShare , ( bool ) $ canPublish );
142142 });
143143 }
144144 }
You can’t perform that action at this time.
0 commit comments