Skip to content

Commit e54c078

Browse files
authored
Merge pull request #50369 from nextcloud/fix/dav/first-login-listener
fix(dav): default calendar and address book not created on first login
2 parents c28464e + d3126cd commit e54c078

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

apps/dav/lib/AppInfo/Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
use OCP\Config\BeforePreferenceSetEvent;
8282
use OCP\Contacts\IManager as IContactsManager;
8383
use OCP\DB\Events\AddMissingIndicesEvent;
84+
use OCP\EventDispatcher\GenericEvent;
8485
use OCP\EventDispatcher\IEventDispatcher;
8586
use OCP\Federation\Events\TrustedServerRemovedEvent;
8687
use OCP\Files\AppData\IAppDataFactory;
@@ -91,7 +92,6 @@
9192
use OCP\User\Events\OutOfOfficeScheduledEvent;
9293
use Psr\Container\ContainerInterface;
9394
use Psr\Log\LoggerInterface;
94-
use Symfony\Component\EventDispatcher\GenericEvent;
9595
use Throwable;
9696
use function is_null;
9797

build/integration/dav_features/caldav.feature

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,8 @@ Feature: caldav
8787
When "user0" requests principal "users/user0" on the endpoint "/remote.php/dav/principals/"
8888
Then The CalDAV response should be multi status
8989
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/"
90+
91+
Scenario: Should create default calendar on first login
92+
Given user "first-login" exists
93+
When "first-login" requests calendar "first-login/personal" on the endpoint "/remote.php/dav/calendars/"
94+
Then The CalDAV HTTP status code should be "207"

build/integration/dav_features/carddav.feature

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,7 @@ Feature: carddav
7979
Then The CardDAV HTTP status code should be "404"
8080
And The CardDAV exception is "Sabre\DAV\Exception\NotFound"
8181
And The CardDAV error message is "File not found: admin in 'addressbooks'"
82+
83+
Scenario: Should create default addressbook on first login
84+
Given user "first-login" exists
85+
Then "first-login" requests addressbook "first-login/contacts" with statuscode "207" on the endpoint "/remote.php/dav/addressbooks/users/"

0 commit comments

Comments
 (0)