Skip to content

Add current_user_privilege_set attributes#15

Merged
pat merged 3 commits into
pat:mainfrom
AntoineGirard:agd/add-privilegies-attributes
Apr 12, 2026
Merged

Add current_user_privilege_set attributes#15
pat merged 3 commits into
pat:mainfrom
AntoineGirard:agd/add-privilegies-attributes

Conversation

@AntoineGirard
Copy link
Copy Markdown
Contributor

@AntoineGirard AntoineGirard commented Feb 20, 2026

Add current-user-privilege-set support

Add support for the current-user-privilege-set WebDAV property (RFC 3744), which exposes the authenticated user's privileges on a calendar (read, write, write-properties, etc.).

Cf : https://datatracker.ietf.org/doc/html/rfc3744#section-3.7

Changes

  • Requests::ListCalendars — Add current-user-privilege-set to PROPERTIES so it is included in PROPFIND requests.
  • Parsers::CalendarXML — Add privileges parser that extracts privilege names from the XML response.
  • Calendar — Add :current_user_privilege_set to ATTRIBUTES, auto-generating the getter.
  • Clients::CalendarsClient — Add :current_user_privilege_set to DEFAULT_ATTRIBUTES so it is fetched by default.
  • Acceptance test — Add a test asserting that listed calendars include privilege information.

Usage

calendar = client.calendars.list.first
calendar.current_user_privilege_set
# => ["read", "write", "write-properties", ...]

@AntoineGirard AntoineGirard force-pushed the agd/add-privilegies-attributes branch from c6b74bb to 7af5629 Compare February 20, 2026 16:07
@AntoineGirard AntoineGirard marked this pull request as ready for review February 20, 2026 16:17
@AntoineGirard AntoineGirard marked this pull request as draft February 20, 2026 16:50
@pat
Copy link
Copy Markdown
Owner

pat commented Feb 21, 2026

All looks good to me thus far - let me know when you feel it's ready to merge.

@AntoineGirard
Copy link
Copy Markdown
Contributor Author

Hi @pat

Actually, I wrote spec only for radicale, but I didn’t try with Apple and Google provider.
Maybe we could add spec for these providers, but we need to regenerate cassettes.

@AntoineGirard AntoineGirard marked this pull request as ready for review February 21, 2026 18:17
@AntoineGirard
Copy link
Copy Markdown
Contributor Author

I moved spec in shared spec and just added a cassette for Apple Calendar.

What do you think about it @pat ?

@AntoineGirard AntoineGirard force-pushed the agd/add-privilegies-attributes branch from 2f4357b to 22276d9 Compare February 23, 2026 22:16
@AntoineGirard
Copy link
Copy Markdown
Contributor Author

Hi @pat

Sorry for the reminder, I know that your time is precious. Have you got a bit of time to review this PR?
Otherwise, I could just use my fork while I wait.

Thanks a lot,

@pat pat merged commit da447ad into pat:main Apr 12, 2026
4 checks passed
@pat
Copy link
Copy Markdown
Owner

pat commented Apr 12, 2026

Sorry it took me so long to get to this - just released in v0.6.0. Thanks for contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants