CalDAV free-busy (scheduling outbox POST) ignores a "Read Free/Busy" share unless "Read Items" is also granted

Issue Description

A calendar shared with only mayReadFreeBusy works for JMAP Principal/getAvailability, but the CalDAV
free-busy request (RFC 6638 POST to the scheduling outbox) returns an empty VFREEBUSY. Busy periods appear
only when mayReadItems is granted too. So CalDAV clients (Thunderbird, Apple Calendar) show an empty
availability grid when users share “free/busy only”.

Expected Behavior

mayReadFreeBusy alone is enough for free-busy data over CalDAV, the same as over JMAP:

  • draft-ietf-jmap-calendars-33, section 4.1: mayReadFreeBusy lets the user read free-busy information;
    section 2.2 requires only mayReadFreeBusy for an event to count in availability.
  • RFC 4791, section 6.1.1: the CALDAV:read-free-busy privilege grants free-busy access on its own
    (it is aggregated under DAV:read, not the other way round).

Actual Behavior

With mayReadFreeBusy: true, mayReadItems: false the VFREEBUSY reply has no FREEBUSY line.
With both set to true the busy period is returned. JMAP Principal/getAvailability returns the busy
period in both cases.

Reproduction Steps

Two users on the same server: [email protected] (asks) and [email protected] (shares).

  1. user2 shares the default calendar with user1, free/busy only (principal id of user1 is c):
curl -s -u "[email protected]:$PASS2" -H 'Content-Type: application/json' https://mail.example.com/jmap/ -d '{
  "using": ["urn:ietf:params:jmap:core", "urn:ietf:params:jmap:calendars"],
  "methodCalls": [["Calendar/set", {"accountId": "e", "update": {"b": {
    "shareWith/c": {"mayReadFreeBusy": true, "mayReadItems": false}}}}, "u"]]}'
  1. user2 has a busy event on 2026-11-02 10:00-11:00 UTC:
["CalendarEvent/set", {"accountId": "e", "create": {"ev": {"calendarIds": {"b": true}, "@type": "Event",
  "title": "busy", "start": "2026-11-02T10:00:00", "timeZone": "Etc/UTC", "duration": "PT1H",
  "freeBusyStatus": "busy"}}}, "s"]
  1. user1 asks for user2’s free-busy over CalDAV:
curl -s -u "[email protected]:$PASS1" -X POST -H 'Content-Type: text/calendar; charset=utf-8' \
  https://mail.example.com/dav/itip/user1%40example.com/outbox/ --data-binary @- <<'EOF'
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//probe//EN
METHOD:REQUEST
BEGIN:VFREEBUSY
UID:fb-probe-1
DTSTAMP:20261021T000000Z
DTSTART:20261102T000000Z
DTEND:20261103T000000Z
ORGANIZER:mailto:[email protected]
ATTENDEE:mailto:[email protected]
END:VFREEBUSY
END:VCALENDAR
EOF

Response (HTTP 200), share = mayReadFreeBusy only. Note: no FREEBUSY line.

<A:schedule-response ...><A:response>
<A:recipient><D:href>mailto:[email protected]</D:href></A:recipient>
<A:request-status>2.0;Success</A:request-status>
<A:calendar-data><![CDATA[BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Stalwart Labs LLC//Stalwart Server//EN
METHOD:REPLY
BEGIN:VFREEBUSY
DTSTART:20261102T000000Z
DTEND:20261103T000000Z
DTSTAMP:20261021T110533Z
ORGANIZER:mailto:[email protected]
ATTENDEE:mailto:[email protected]
UID:fb-probe-1
END:VFREEBUSY
END:VCALENDAR
]]></A:calendar-data></A:response></A:schedule-response>

Same request after changing the share to mayReadFreeBusy: true, mayReadItems: true:

FREEBUSY;FBTYPE=BUSY:20261102T100000Z/20261102T110000Z

JMAP for comparison, share = mayReadFreeBusy only:

{"using": ["urn:ietf:params:jmap:core", "urn:ietf:params:jmap:principals", "urn:ietf:params:jmap:principals:availability"],
 "methodCalls": [["Principal/getAvailability", {"accountId": "c", "id": "e",
   "utcStart": "2026-11-02T00:00:00Z", "utcEnd": "2026-11-03T00:00:00Z"}, "a"]]}
{"methodResponses": [["Principal/getAvailability", {"list": [{"utcStart": "2026-11-02T10:00:00Z",
  "utcEnd": "2026-11-02T11:00:00Z", "busyStatus": "confirmed", "event": null}]}, "a"]]}

Stalwart Version

v0.16.x

Installation Method

Docker

Database Backend

RocksDB

Blob Storage

RocksDB

Search Engine

Internal

Directory Backend

Internal

Additional Context

Related: Calendar shared with "Read Free/Busy" permission is not visible to the grantee - there the CalDAV scheduling outbox is named as the way to get free/busy for a free/busy-only share. With v0.16.27 that path returns no busy data.

Where it seems to come from: crates/dav/src/calendar/freebusy.rs, build_freebusy_object():

resources.shared_items(access_token, [Acl::ReadItems, Acl::SchedulingReadFreeBusy], false)

shared_items(.., match_any = false) requires both ACLs. The JMAP path (crates/jmap/src/principal/availability.rs) calls the same function with true. Same code on main today. Changing false to true looks like the whole fix.

Stalwart v0.16.27, Docker image stalwartlabs/stalwart:v0.16-alpine, default setup from the bootstrap wizard.

I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.

on

I have searched this support forum (open and closed topics) and confirm this is not a duplicate.

on

I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.

on

This confirms the report is accurate against the current server source: the CalDAV scheduling outbox path (crates/dav/src/calendar/freebusy.rs, shared_items(access_token, [Acl::ReadItems, Acl::SchedulingReadFreeBusy], false)) requires both ACLs (match_any = false), while the equivalent JMAP Principal/getAvailability path (crates/jmap/src/principal/availability.rs) calls the same function with match_any = true, so a mayReadFreeBusy-only share works there but not over CalDAV. This is a genuine inconsistency between the two code paths as you diagnosed, not something documented or intentional in the docs.

This confirms the user’s finding exactly. I have enough to give a grounded reply confirming this is a genuine bug, citing the source code location and the discrepancy with the JMAP path.

This is a confirmed code-level bug analysis, not something the docs can resolve or contradict. I’ll reply acknowledging the accurate diagnosis.

Confirmed: this is a bug in the CalDAV scheduling outbox free/busy handler, not intended behavior. In crates/dav/src/calendar/freebusy.rs, build_freebusy_object() calls resources.shared_items(access_token, [Acl::ReadItems, Acl::SchedulingReadFreeBusy], false) with match_any = false, which requires both ACLs to be present. The equivalent JMAP path, crates/jmap/src/principal/availability.rs, calls the same function with match_any = true, correctly treating ReadItems and SchedulingReadFreeBusy as alternatives. Your diagnosis (changing the false to true in the CalDAV free-busy path) matches how the ACL check is meant to behave per the Privilege::ReadFreeBusy/ScheduleSendFreeBusy mapping in crates/dav/src/common/acl.rs, where Acl::SchedulingReadFreeBusy alone is sufficient to grant that privilege.

This has been logged for a developer to review and fix; thanks for the detailed repro and source pointers.

This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.

Fixed in v1.0.0 (expected next week).