aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Steinmetz <richard@steinmetz.cloud>2025-01-24 11:22:11 +0100
committerGitHub <noreply@github.com>2025-01-24 11:22:11 +0100
commit4febc1089e7d62f89e0a3ae88c932b7a338942f4 (patch)
tree6210ed17480873e7389df420248a7c03c93c8e97
parentcdfe14c860664cac9b262e3dbcff1a48fde34aa2 (diff)
parenta3664877aba24e3fefa303ea16459b05bb1b4672 (diff)
downloadnextcloud-server-4febc1089e7d62f89e0a3ae88c932b7a338942f4.tar.gz
nextcloud-server-4febc1089e7d62f89e0a3ae88c932b7a338942f4.zip
Merge pull request #50371 from nextcloud/backport/50369/stable29
[stable29] fix(dav): default calendar and address book not created on first login
-rw-r--r--apps/dav/lib/AppInfo/Application.php2
-rw-r--r--build/integration/dav_features/caldav.feature5
-rw-r--r--build/integration/dav_features/carddav.feature4
3 files changed, 10 insertions, 1 deletions
diff --git a/apps/dav/lib/AppInfo/Application.php b/apps/dav/lib/AppInfo/Application.php
index d8aa02d1312..168144b2f5e 100644
--- a/apps/dav/lib/AppInfo/Application.php
+++ b/apps/dav/lib/AppInfo/Application.php
@@ -104,6 +104,7 @@ use OCP\Config\BeforePreferenceDeletedEvent;
use OCP\Config\BeforePreferenceSetEvent;
use OCP\Contacts\IManager as IContactsManager;
use OCP\DB\Events\AddMissingIndicesEvent;
+use OCP\EventDispatcher\GenericEvent;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Federation\Events\TrustedServerRemovedEvent;
use OCP\Files\AppData\IAppDataFactory;
@@ -113,7 +114,6 @@ use OCP\User\Events\OutOfOfficeClearedEvent;
use OCP\User\Events\OutOfOfficeScheduledEvent;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;
-use Symfony\Component\EventDispatcher\GenericEvent;
use Throwable;
use function is_null;
diff --git a/build/integration/dav_features/caldav.feature b/build/integration/dav_features/caldav.feature
index b3068590863..10b4fdfdcac 100644
--- a/build/integration/dav_features/caldav.feature
+++ b/build/integration/dav_features/caldav.feature
@@ -79,3 +79,8 @@ Feature: caldav
When "user0" requests principal "users/user0" on the endpoint "/remote.php/dav/principals/"
Then The CalDAV response should be multi status
And The CalDAV response should contain a property "{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL" with a href value "/remote.php/dav/calendars/user0/MyCalendar2/"
+
+ Scenario: Should create default calendar on first login
+ Given user "first-login" exists
+ When "first-login" requests calendar "first-login/personal" on the endpoint "/remote.php/dav/calendars/"
+ Then The CalDAV HTTP status code should be "207"
diff --git a/build/integration/dav_features/carddav.feature b/build/integration/dav_features/carddav.feature
index 15f1e95e737..322c63f8bce 100644
--- a/build/integration/dav_features/carddav.feature
+++ b/build/integration/dav_features/carddav.feature
@@ -72,3 +72,7 @@ Feature: carddav
When "user0" sends a create addressbook request to "admin/MyAddressbook2" on the endpoint "/remote.php/dav/addressbooks/"
Then The CardDAV HTTP status code should be "404"
And The CardDAV exception is "Internal Server Error"
+
+ Scenario: Should create default addressbook on first login
+ Given user "first-login" exists
+ Then "first-login" requests addressbook "first-login/contacts" with statuscode "207" on the endpoint "/remote.php/dav/addressbooks/users/"