aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/exchange-operations/ChangeLog18
-rw-r--r--plugins/exchange-operations/exchange-account-setup.c4
-rw-r--r--plugins/exchange-operations/exchange-config-listener.c29
3 files changed, 45 insertions, 6 deletions
diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog
index b8cd722394..0b75458331 100644
--- a/plugins/exchange-operations/ChangeLog
+++ b/plugins/exchange-operations/ChangeLog
@@ -1,5 +1,23 @@
2005-12-19 Sushma Rai <rsushma@novell.com>
+ * exchange-account-setup.c (owa_authenticate_user): Adding the
+ parameter "save-passwd" to CamelURL, during account creation, which can
+ be used to see if the user has remembered password or password is
+ temporarily remembered so that password is not prompted second time at
+ the end of account creation.
+
+ * exchange-config-listener.c (exchange_config_listener_authenticate):
+ Using the flag E_PASSWORDS_REMEMBER_FOREVER instead of
+ E_PASSWORDS_REMEMBER_SESSION. Reading the save-passwd URL parameter to
+ see if the password was remembered by the user or remembered
+ temporarily by the plugin and foget it in case of remembered by the
+ plugin. Also free CamelURL.
+ (account_added): Calling exchange_config_listener_authenticate().
+
+ Fixes #324485
+
+2005-12-19 Sushma Rai <rsushma@novell.com>
+
* exchange-account-setup.c (org_gnome_exchange_settings)
(owa_editor_entry_changed)(org_gnome_exchange_owa_url)
(org_gnome_exchange_commit): free CamelURL.
diff --git a/plugins/exchange-operations/exchange-account-setup.c b/plugins/exchange-operations/exchange-account-setup.c
index 383d5f6b13..2bbf963970 100644
--- a/plugins/exchange-operations/exchange-account-setup.c
+++ b/plugins/exchange-operations/exchange-account-setup.c
@@ -478,8 +478,10 @@ owa_authenticate_user(GtkWidget *button, EConfig *config)
print_error (owa_url, result);
camel_url_set_host (url, valid ? exchange_params->host : "");
- if (valid)
+ if (valid) {
camel_url_set_authmech (url, exchange_params->is_ntlm ? "NTLM" : "Basic");
+ camel_url_set_param (url, "save-passwd", remember_password? "true" : "false");
+ }
camel_url_set_param (url, "ad_server", valid ? exchange_params->ad_server: NULL);
camel_url_set_param (url, "mailbox", valid ? exchange_params->mailbox : NULL);
camel_url_set_param (url, "owa_path", valid ? exchange_params->owa_path : NULL);
diff --git a/plugins/exchange-operations/exchange-config-listener.c b/plugins/exchange-operations/exchange-config-listener.c
index b711c63e0d..beb19a110f 100644
--- a/plugins/exchange-operations/exchange-config-listener.c
+++ b/plugins/exchange-operations/exchange-config-listener.c
@@ -588,21 +588,39 @@ exchange_config_listener_authenticate (ExchangeConfigListener *ex_conf_listener,
ExchangeConfigListenerPrivate *priv;
ExchangeAccountResult result;
char *key, *password, *title;
- gboolean remember = FALSE;
+ gboolean oldremember, remember = FALSE;
CamelURL *camel_url;
-
+ const char *remember_password;
+
g_return_val_if_fail (EXCHANGE_IS_CONFIG_LISTENER (ex_conf_listener), EXCHANGE_ACCOUNT_CONFIG_ERROR);
priv = ex_conf_listener->priv;
camel_url = camel_url_new (priv->configured_uri, NULL);
key = camel_url_to_string (camel_url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS);
+ remember_password = camel_url_get_param (camel_url, "save-passwd");
password = e_passwords_get_password ("Exchange", key);
if (!password) {
+ oldremember = remember = exchange_account_is_save_password (account);
title = g_strdup_printf (_("Enter Password for %s"), account->account_name);
- password = e_passwords_ask_password (title, "Exchange", key, title, E_PASSWORDS_REMEMBER_SESSION|E_PASSWORDS_SECRET , &remember, NULL);
- }
+ password = e_passwords_ask_password (title, "Exchange", key, title,
+ E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET,
+ &remember, NULL);
+ if (remember != oldremember) {
+ exchange_account_set_save_password (account, remember);
+ }
+ g_free (title);
+ }
+ else if (remember_password && !g_strcasecmp (remember_password, "fasle")) {
+ /* get_password returns the password cached but user has not
+ * selected remember password option, forget this password
+ * whis is stored temporarily by e2k_validate_user(), to avoid
+ * asking for password again, at the end of account creation.
+ */
+ e_passwords_forget_password ("Exchange", key);
+ }
exchange_account_connect (account, password, &result);
-
+ g_free (key);
+ camel_url_free (camel_url);
return result;
}
@@ -658,6 +676,7 @@ account_added (EAccountList *account_list, EAccount *account)
return;
}
+ exchange_config_listener_authenticate (config_listener, exchange_account);
exchange_account_set_online (exchange_account);
}