[evolution] EMailAccountStore: Check permissions before writing/removing sources.



commit a1d2eb47189ccc2109d3080505de4a0319d2f18c
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Jul 15 14:46:40 2012 -0400

    EMailAccountStore: Check permissions before writing/removing sources.

 mail/e-mail-account-store.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/mail/e-mail-account-store.c b/mail/e-mail-account-store.c
index 8b8b6fc..51ad51c 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++;



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