[evolution-data-server] M!29 - WebDAV: Add a way to allow any component with MKCALENDAR



commit 53966dfecd650ec9757b8cd009b36657560a8276
Author: Дилян Палаузов <git-dpa aegee org>
Date:   Wed Jul 24 12:52:14 2019 +0000

    M!29 - WebDAV: Add a way to allow any component with MKCALENDAR
    
    During the creation of new CalDAV calendars, Evolution offers as components
    Tasks, Events and Memos.  The user has to select some of the offered components
    in order to create the WebDAV collection and the server is asked to create
    exactly those components, that the user has chosen.
    
    With this fix, if the user selects all three components, the software assumes
    that the user wants a collection supporting whatever components the server
    offers, including VTIMEZONE and VAVAILABILITY.
    
    Closes https://gitlab.gnome.org/GNOME/evolution-data-server/merge_requests/29

 src/libedataserver/e-webdav-session.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/libedataserver/e-webdav-session.c b/src/libedataserver/e-webdav-session.c
index 00535b9db..721eff64e 100644
--- a/src/libedataserver/e-webdav-session.c
+++ b/src/libedataserver/e-webdav-session.c
@@ -1849,7 +1849,12 @@ e_webdav_session_mkcalendar_sync (EWebDAVSession *webdav,
                        e_xml_document_end_element (xml);
                }
 
-               if (supports != 0) {
+               if (supports != 0 && supports != (E_WEBDAV_RESOURCE_SUPPORTS_EVENTS |
+                   E_WEBDAV_RESOURCE_SUPPORTS_TASKS | E_WEBDAV_RESOURCE_SUPPORTS_MEMOS)) {
+                       /* If the user has selected Events, Tasks and Memos, all of them offered by
+                        * Evolution, then user actually wants the new collection to contain whatever
+                        * components the server supports, including VAVAILABILITY, or anything invented
+                        * in the future, for which EDS and Evolution have no knowledge. */
                        struct SupportValues {
                                guint32 mask;
                                const gchar *value;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]