Skip to content

[stable31] fix(dav): apply sharing rules to calendars and address books - #67203

Open
GVodyanov wants to merge 2 commits into
stable31from
backport/67006/stable31
Open

GVodyanov wants to merge 2 commits into
stable31from
backport/67006/stable31

Conversation

@GVodyanov

Copy link
Copy Markdown
Contributor

Backport of #67006

Builds on #67201, please merge that one first. Until then, this diff also shows its commit.

The backport bot couldn't apply this one, so it was done by hand. Changes for this branch:

  • There is no calendar federation and no remote-user sharing here, so those parts are left out. The sharing backend resolves sharees with Principal::getPrincipalByPath().
  • The trash bin of shared calendars isn't exposed to sharees on this branch, so that query isn't changed.
  • SystemAddressbook still reads the enumeration settings from IConfig; the changes are applied to that structure (same as on stable32), with matching Psalm baseline entries. findByUri() now documents string|null, so five baseline entries are no longer needed.
  • Tests are adjusted to this branch's constructors and helpers. This branch runs PHPUnit 9, so the new tests use @dataProvider annotations instead of attributes.

Assisted by ClaudeCode:claude-opus-5-5

Writes into another user's calendar, such as iTIP delivery, replies
or edits in a shared calendar, recorded that calendar's sharees and
attendees as recently contacted by the writer. Only writes to the
writer's own calendars record interactions now.

Deleting an event purged invitation response links by UID alone, so
deleting any copy of an event, for example an attendee's, also
removed the organizer's links. Purges now only match invitations
sent by the calendar owner, and only for regular calendars. An
attendee's response links also stayed valid after the organizer
removed them, and replying through one added them back to the event.
Cancelling an attendee now revokes their links.

Additional email addresses counted as calendar user addresses even
before they were verified. Only verified ones count now. In the
provisioning API, editUserMultiValue() treated users editing their
own account like an admin edit and stored the new address as
verified, looked the new address up by the old value, and accepted
duplicates.

Not included: attendees removed occurrence by occurrence keep the
links of earlier occurrences, and invitations have no column linking
them to their calendar, which would make purges exact.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Grigory Vodyanov <scratchx@gmx.com>
Calendar and address book shares only checked that the sharee exists.
They now follow the same admin settings as the share dialog: the share
API toggle, excluded groups, group sharing, and sharing with group
members only together with its exclude list. Removing a share is
always allowed. Scheduling to principal: URIs applies the group
members restriction as mailto: already did.

With the trash bin enabled, a deleted calendar kept its shares, and the
share based lookups did not check deleted_at, so sharees and public
links kept using the calendar until it was purged. Only the owner sees
calendars in the trash bin now. Trashed objects are no longer served as
children of their calendar, only through the trash bin, and only the
owner can restore a deleted calendar.

The system address book is meant to be read-only, but cards built for
trusted servers had no ACL, its write-acl privilege allowed sharing it,
and property changes updated its shared row. Cards now get the
read-only ACL, sharing it is refused and existing share rows are
ignored, and properties are stored per account. Its sync applies the
same enumeration filter as listing it.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Grigory Vodyanov <scratchx@gmx.com>
@GVodyanov
GVodyanov force-pushed the backport/67006/stable31 branch from beaa3a3 to d96b74f Compare December 1, 2026 15:39

This branch has not been deployed

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

Labels

3. to review Waiting for reviews AI assisted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants