Extract caldav sharing stuff from publishing stuff#34873
Extract caldav sharing stuff from publishing stuff#34873
Conversation
| * @var IConfig | ||
| */ | ||
| protected $config; | ||
| protected Server $server; |
Check notice
Code scanning / Psalm
PropertyNotSetInConstructor
| class SharingPlugin extends ServerPlugin { | ||
| public const NS_CALENDARSERVER = 'http://calendarserver.org/ns/'; | ||
|
|
||
| protected Server $server; |
Check notice
Code scanning / Psalm
PropertyNotSetInConstructor
| * | ||
| * @param Server $server | ||
| */ | ||
| public function initialize(Server $server) { |
Check notice
Code scanning / Psalm
MissingReturnType
| $this->server->on('propFind', [$this, 'propFind']); | ||
| } | ||
|
|
||
| public function propFind(PropFind $propFind, INode $node) { |
Check notice
Code scanning / Psalm
MissingReturnType
|
Didn't notice any problems after applying this patch on 24.0.5. Thank you! |
miaulalala
left a comment
There was a problem hiding this comment.
- no value set - public share links work and is an option in calendar
- value set to yes - public share link works and is an option in calendar
- value set to no - public share link does not work and there is not an option to create a public share link in calendar but sharing with users and groups still works
This mod disallows sharing calendars via link when `shareapi_allow_links` is disabled. Related: nextcloud/calendar#525 Related: nextcloud/calendar#4399 Author-Change-Id: IB#1126264 Signed-off-by: Pawel Boguslawski <[email protected]>
Fixes: 45eefc2 Related: #34372 Author-Change-Id: IB#1126264 Signed-off-by: Pawel Boguslawski <[email protected]>
So that it's still there when we disable the PublishPlugin Signed-off-by: Thomas Citharel <[email protected]>
4fd3cba to
7f87ac8
Compare
🙌 🙌 |
|
Due to the callbacks, Sabre patterns are hard to test, there would be low value for added tests here. Not sure if it's impossible, but it's never been done before in all other plugins. |
|
After upgrading to server 25.0.3 with this mod applied + calendar 4.2.1, when ...then After enabling... ...clicking Seems that server blocks sharing via link correctly but calendar app after upgrade should have |
|
@tcitworld can you please fix the conflicts and the tests? Thanks in advance! :) |
|
@tcitworld any chance you want to rebase this to the current version? This PR is a year old. |
Based on and replaces #34372 by @pboguslawski
The publishing plugin handled both doing the actual publishing/unpublishing as well as exposing the supported sharing features.
Now we have one for each use and publishing can be properly disabled. The CalDAVSharingPlugin will probably be useful for most of the issues in #20096 anyway.