summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2020-02-19 18:44:54 +0100
committerMilan Crha <mcrha@redhat.com>2020-02-19 18:44:54 +0100
commita9c05ee0e1b8c4550079e3e6778574e4f332295c (patch)
tree08312029c678c45469d46b4233f0faeda285c53a
parentac7c8bf53450f60e975280d009768df3f43e03e8 (diff)
downloadevolution-data-server-a9c05ee0e1b8c4550079e3e6778574e4f332295c.tar.gz
EWebDAVCollectionBackend: Require credentials only if user name is set
This way users can configure WebDAV accounts for servers, which do not require authentication (aka those providing public calendars). Related to https://gitlab.gnome.org/GNOME/evolution/issues/668
-rw-r--r--src/libebackend/e-webdav-collection-backend.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libebackend/e-webdav-collection-backend.c b/src/libebackend/e-webdav-collection-backend.c
index cc1f67e3f..19bfc03e1 100644
--- a/src/libebackend/e-webdav-collection-backend.c
+++ b/src/libebackend/e-webdav-collection-backend.c
@@ -334,13 +334,15 @@ webdav_collection_backend_populate (ECollectionBackend *collection)
if (e_source_has_extension (source, E_SOURCE_EXTENSION_AUTHENTICATION)) {
ESourceAuthentication *auth_extension;
- gchar *method;
+ gchar *method, *user;
auth_extension = e_source_get_extension (source, E_SOURCE_EXTENSION_AUTHENTICATION);
method = e_source_authentication_dup_method (auth_extension);
- needs_credentials = g_strcmp0 (method, "OAuth2") != 0 &&
+ user = e_source_authentication_dup_user (auth_extension);
+ needs_credentials = user && *user && g_strcmp0 (method, "OAuth2") != 0 &&
!e_oauth2_services_is_oauth2_alias (e_source_registry_server_get_oauth2_services (server), method);
g_free (method);
+ g_free (user);
}
if (needs_credentials) {