From a1d2eb47189ccc2109d3080505de4a0319d2f18c Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 15 Jul 2012 14:46:40 -0400 Subject: EMailAccountStore: Check permissions before writing/removing sources. --- mail/e-mail-account-store.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'mail') diff --git a/mail/e-mail-account-store.c b/mail/e-mail-account-store.c index 8b8b6fc63a..51ad51cd95 100644 --- a/mail/e-mail-account-store.c +++ b/mail/e-mail-account-store.c @@ -519,7 +519,7 @@ mail_account_store_service_removed (EMailAccountStore *store, } } - if (source != NULL) { + if (source != NULL && e_source_get_removable (source)) { store->priv->busy_count++; g_object_notify (G_OBJECT (store), "busy"); @@ -568,7 +568,7 @@ mail_account_store_service_enabled (EMailAccountStore *store, if (uid != NULL) identity = e_source_registry_ref_source (registry, uid); - if (identity != NULL) { + if (identity != NULL && e_source_get_writable (identity)) { e_source_set_enabled (identity, TRUE); store->priv->busy_count++; @@ -598,7 +598,7 @@ mail_account_store_service_enabled (EMailAccountStore *store, } } - if (source != NULL) { + if (source != NULL && e_source_get_writable (source)) { e_source_set_enabled (source, TRUE); store->priv->busy_count++; @@ -649,7 +649,7 @@ mail_account_store_service_disabled (EMailAccountStore *store, if (uid != NULL) identity = e_source_registry_ref_source (registry, uid); - if (identity != NULL) { + if (identity != NULL && e_source_get_writable (identity)) { e_source_set_enabled (identity, FALSE); store->priv->busy_count++; @@ -679,7 +679,7 @@ mail_account_store_service_disabled (EMailAccountStore *store, } } - if (source != NULL) { + if (source != NULL && e_source_get_writable (source)) { e_source_set_enabled (source, FALSE); store->priv->busy_count++; -- cgit v1.2.3