Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions build/integration/dav_features/caldav-delegation.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-or-later
Feature: calendar delegation
Calendar delegation grants another user/principal control of a calendar account,
including all calendars the delegator can access.

Scenario: admin grants user0 read access to her calendar account
Given user "admin" exists
And user "user0" exists
When "admin" updates property "{DAV:}group-member-set" to href "/remote.php/dav/principals/users/user0" of principal "users/admin/calendar-proxy-read" on the endpoint "/remote.php/dav/principals/"
Then The CalDAV response should be multi status
And The CalDAV response should contain an href "/remote.php/dav/principals/users/admin/calendar-proxy-read"
And The CalDAV response should contain a property "{DAV:}group-member-set"

Scenario: admin grants write access to her calendar account
Given user "admin" exists
And user "user0" exists
When "admin" updates property "{DAV:}group-member-set" to href "/remote.php/dav/principals/users/user0" of principal "users/admin/calendar-proxy-write" on the endpoint "/remote.php/dav/principals/"
Then The CalDAV response should be multi status
And The CalDAV response should contain an href "/remote.php/dav/principals/users/admin/calendar-proxy-write"
And The CalDAV response should contain a property "{DAV:}group-member-set"
20 changes: 20 additions & 0 deletions build/integration/features/bootstrap/CalDavContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,26 @@ public function theCaldavResponseShouldContainAPropertyWithHrefValue(
}
}

/**
* @Then The CalDAV response should contain an href :href
* @throws \Exception
*/
public function theCaldavResponseShouldContainAnHref(string $href): void {
/** @var \Sabre\DAV\Xml\Response\MultiStatus $multiStatus */
$multiStatus = $this->responseXml['value'];
foreach ($multiStatus->getResponses() as $response) {
if ($response->getHref() === $href) {
return;
}
}
throw new \Exception(
sprintf(
'Expected href %s not found in response',
$href,
)
);
}

/**
* @Then The CalDAV response should be multi status
* @throws \Exception
Expand Down
Loading