feat(dav): update a principal's schedule-default-calendar-URL#43745
Merged
feat(dav): update a principal's schedule-default-calendar-URL#43745
Conversation
2 tasks
| // Try to parse a more specialized property type first | ||
| if ($value instanceof Complex) { | ||
| $xml = $this->xmlService->write($name, [$value], $this->server->getBaseUri()); | ||
| $value = $this->xmlService->parse($xml, $this->server->getBaseUri()) ?? $value; |
Check notice
Code scanning / Psalm
RedundantConditionGivenDocblockType
| // Try to parse a more specialized property type first | ||
| if ($value instanceof Complex) { | ||
| $xml = $this->xmlService->write($name, [$value], $this->server->getBaseUri()); | ||
| $value = $this->xmlService->parse($xml, $this->server->getBaseUri()) ?? $value; |
Check notice
Code scanning / Psalm
DocblockTypeContradiction
| } | ||
|
|
||
| if ($name === '{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL') { | ||
| $value = $this->encodeDefaultCalendarUrl($value); |
Check notice
Code scanning / Psalm
PossiblyInvalidArgument
d7a272d to
69bd8be
Compare
Member
Author
|
(Code style fixes are resolved locally. I'll push later to prevent wasting CI time.) |
Merged
2 tasks
ChristophWurst
approved these changes
Feb 28, 2024
Comment on lines
+79
to
+87
| Scenario: Update a principal's schedule-default-calendar-URL | ||
| Given user "user0" exists | ||
| And "user0" creates a calendar named "MyCalendar2" | ||
| When "user0" updates property "{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL" to href "/remote.php/dav/calendars/user0/MyCalendar2/" of principal "users/user0" on the endpoint "/remote.php/dav/principals/" | ||
| Then The CalDAV response should be multi status | ||
| And The CalDAV response should contain a property "{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL" | ||
| When "user0" requests principal "users/user0" on the endpoint "/remote.php/dav/principals/" | ||
| Then The CalDAV response should be multi status | ||
| And The CalDAV response should contain a property "{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL" with a href value "/remote.php/dav/calendars/user0/MyCalendar2/" |
tcitworld
approved these changes
Feb 28, 2024
Signed-off-by: Richard Steinmetz <[email protected]>
69bd8be to
53ef6c5
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Allow updating a principal's
schedule-default-calendar-URLvia aPROPPATCH. The property will be saved inoc_properties.TODO
Checklist