Skip to content

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

Open
backportbot[bot] wants to merge 2 commits into
stable35from
backport/67006/stable35
Open

backportbot[bot] wants to merge 2 commits into
stable35from
backport/67006/stable35

Conversation

@backportbot

@backportbot backportbot Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Backport of #67006

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

One line in CardDavBackendTest that only exists on master (capturing audit events) is left out.

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>
@backportbot backportbot Bot added 3. to review Waiting for reviews AI assisted labels Nov 30, 2026
@backportbot backportbot Bot added this to the Nextcloud 35.0.4 milestone Nov 30, 2026
@GVodyanov
GVodyanov force-pushed the backport/67006/stable35 branch from e18b539 to a6b9c69 Compare November 30, 2026 10:12
@GVodyanov
GVodyanov marked this pull request as ready for review November 30, 2026 10:13
@GVodyanov
GVodyanov requested review from a team, hamza221 and tcitworld as code owners November 30, 2026 10:13
@GVodyanov
GVodyanov requested review from Altahrim and icewind1991 and removed request for a team November 30, 2026 10:13
@nextcloud-bot nextcloud-bot mentioned this pull request Nov 30, 2026

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