caldav + carddav: add principal to resourcetype flag for UserPrinicipal request.#193
Closed
prasad83 wants to merge 8 commits intoemersion:masterfrom
Closed
caldav + carddav: add principal to resourcetype flag for UserPrinicipal request.#193prasad83 wants to merge 8 commits intoemersion:masterfrom
prasad83 wants to merge 8 commits intoemersion:masterfrom
Conversation
Added PrincipalName variable reference to internal/elements.go
Add principal resourcetype to user principal responses to properly identify the resource hierarchy for CalDAV clients (Thunderbird)
emersion
reviewed
Oct 15, 2025
Owner
emersion
left a comment
There was a problem hiding this comment.
Good catch! LGTM overall, just two minor comments!
Owner
|
Also, can you rework the commit title to just use the package name as prefix instead of conventional commits? We don't use conventional commits. |
Contributor
Author
|
Updated PR title as recommended. Thanks |
As per rfc3744#section-5.4
current-user-privilege-set should be valid when propfind is issued. Failing to respond will lead to unexpected behaviour at client-end. Refer: [rfc3744#section-5.4](https://tools.ietf.org/html/rfc3744#section-5.4) For now implemented read-and-write as allowed.
Contributor
Author
emersion
reviewed
Oct 18, 2025
| GetETagName = xml.Name{Namespace, "getetag"} | ||
|
|
||
| CurrentUserPrincipalName = xml.Name{Namespace, "current-user-principal"} | ||
| CurrentUserPrivilegeSet = xml.Name{Namespace, "current-user-privilege-set"} |
Owner
There was a problem hiding this comment.
Renamed to CurrentUserPrivilegeSetName
| } | ||
|
|
||
| // https://tools.ietf.org/html/rfc3744#section-5.4 | ||
| type CurrentUserPrivilege struct { |
Owner
There was a problem hiding this comment.
Renamed to CurrentUserPrivilegeSet
| // https://tools.ietf.org/html/rfc3744#section-5.4 | ||
| type CurrentUserPrivilege struct { | ||
| XMLName xml.Name `xml:"DAV: current-user-privilege-set"` | ||
| Privilege Privilege |
Owner
There was a problem hiding this comment.
There can be multiple of these in the element definition
| {ContentType: vcard.MIMEType, Version: "4.0"}, | ||
| }, | ||
| }), | ||
| internal.CurrentUserPrivilegeSet: func(raw *internal.RawXMLValue) (interface{}, error) { |
Owner
There was a problem hiding this comment.
internal.PropFindValue can be used here.
The same should be applied to caldav.
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.
For PROPFIND principalPath request - the response resourcetype should add principal attribute.
Without this Thunderbird Calendar setup was not making call get List of Calendars