Skip to content

Commit 8fb04cd

Browse files
committed
fix(dav): default calendar and address book not created on first login
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
1 parent 346253e commit 8fb04cd

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;
@@ -90,7 +91,6 @@
9091
use OCP\User\Events\OutOfOfficeScheduledEvent;
9192
use Psr\Container\ContainerInterface;
9293
use Psr\Log\LoggerInterface;
93-
use Symfony\Component\EventDispatcher\GenericEvent;
9494
use Throwable;
9595
use function is_null;
9696

build/integration/dav_features/caldav.feature

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,8 @@ Feature: caldav
8181
When "user0" requests principal "users/user0" on the endpoint "/remote.php/dav/principals/"
8282
Then The CalDAV response should be multi status
8383
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/"
84+
85+
Scenario: Should create default calendar on first login
86+
Given user "first-login" exists
87+
When "first-login" requests calendar "first-login/personal" on the endpoint "/remote.php/dav/calendars/"
88+
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
@@ -74,3 +74,7 @@ Feature: carddav
7474
When "user0" sends a create addressbook request to "admin/MyAddressbook2" on the endpoint "/remote.php/dav/addressbooks/"
7575
Then The CardDAV HTTP status code should be "404"
7676
And The CardDAV exception is "Internal Server Error"
77+
78+
Scenario: Should create default addressbook on first login
79+
Given user "first-login" exists
80+
Then "first-login" requests addressbook "first-login/contacts" with statuscode "207" on the endpoint "/remote.php/dav/addressbooks/users/"

0 commit comments

Comments
 (0)