Skip to content

Commit a366487

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 7455832 commit a366487

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
@@ -104,6 +104,7 @@
104104
use OCP\Config\BeforePreferenceSetEvent;
105105
use OCP\Contacts\IManager as IContactsManager;
106106
use OCP\DB\Events\AddMissingIndicesEvent;
107+
use OCP\EventDispatcher\GenericEvent;
107108
use OCP\EventDispatcher\IEventDispatcher;
108109
use OCP\Federation\Events\TrustedServerRemovedEvent;
109110
use OCP\Files\AppData\IAppDataFactory;
@@ -113,7 +114,6 @@
113114
use OCP\User\Events\OutOfOfficeScheduledEvent;
114115
use Psr\Container\ContainerInterface;
115116
use Psr\Log\LoggerInterface;
116-
use Symfony\Component\EventDispatcher\GenericEvent;
117117
use Throwable;
118118
use function is_null;
119119

build/integration/dav_features/caldav.feature

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

0 commit comments

Comments
 (0)