[evolution-ews] Creation and modification of private distribution list is not supported in ews, so report an error i
- From: Chenthill Palanisamy <pchen src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Creation and modification of private distribution list is not supported in ews, so report an error i
- Date: Mon, 18 Jul 2011 12:57:44 +0000 (UTC)
commit e6949fb7e439ae161ca131207cff3c92594b1d27
Author: Chenthill Palanisamy <pchenthill novell com>
Date: Mon Jul 18 18:22:38 2011 +0530
Creation and modification of private distribution list
is not supported in ews, so report an error in those cases.
http://msdn.microsoft.com/en-us/library/aa580529%28v=EXCHG.80%29.aspx .
src/addressbook/e-book-backend-ews.c | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-ews.c b/src/addressbook/e-book-backend-ews.c
index 84ac6c7..603c1e1 100644
--- a/src/addressbook/e-book-backend-ews.c
+++ b/src/addressbook/e-book-backend-ews.c
@@ -539,6 +539,12 @@ e_book_backend_ews_create_contact (EBookBackend *backend,
}
contact = e_contact_new_from_vcard (vcard);
+
+ if (e_contact_get (contact, E_CONTACT_IS_LIST)) {
+ g_object_unref (contact);
+ e_data_book_respond_create (book, opid, EDB_ERROR (NOT_SUPPORTED), NULL);
+ return;
+ }
create_contact = g_new0(EwsCreateContact, 1);
create_contact->ebews = g_object_ref(ebews);
@@ -683,12 +689,23 @@ e_book_backend_ews_modify_contact (EBookBackend *backend,
e_data_book_respond_modify (book, opid, EDB_ERROR (AUTHENTICATION_REQUIRED), NULL);
return;
}
+
if (!egwb->priv->is_writable) {
e_data_book_respond_modify (book, opid, EDB_ERROR (PERMISSION_DENIED), NULL);
return;
}
+
+ contact = e_contact_new_from_vcard (vcard);
+
+ if (e_contact_get (contact, E_CONTACT_IS_LIST)) {
+ g_object_unref (contact);
+ e_data_book_respond_create (book, opid, EDB_ERROR (NOT_SUPPORTED), NULL);
+ return;
+ }
- e_data_book_respond_modify (book, opid, EDB_ERROR (SUCCESS), contact);
+ /* TODO implement */
+ g_object_unref (contact);
+ e_data_book_respond_create (book, opid, EDB_ERROR (NOT_SUPPORTED), NULL);
return;
default :
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]