[evolution-patches] Exchange connector - patch for allowing account creation only after user authentication.



Hi,

For exhange account setup, once the user enters user name the forward
button gets enabled because page check returns success as we 
initialize the hostname to "" in the plugin. 
But we should allow user to proceed with account creation only after
user gets authenticated, with the owa url value provided.

Please review the attached patch for this problem.

Thanks,
Sushma.



Index: exchange-account-setup.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-account-setup/exchange-account-setup.c,v
retrieving revision 1.10
diff -u -p -r1.10 exchange-account-setup.c
--- exchange-account-setup.c	23 Feb 2005 06:11:58 -0000	1.10
+++ exchange-account-setup.c	25 Feb 2005 13:25:25 -0000
@@ -375,14 +375,20 @@ org_gnome_exchange_check_options(EPlugin
 
 	/* We assume that if the host is set, then the setting is valid.
 	   The host gets set when the provider validate() call is made */
-	if (data->pageid == NULL || strcmp(data->pageid, "20.receive_options") == 0) {
+	/* Here we check for host name not being NULL or "", so that user can
+	 * proceed with the account set up only after user is validated,
+	 * and host name is reset by validate() call
+	 */
+	if (data->pageid == NULL ||
+	    strcmp (data->pageid, "10.receive") == 0 ||
+	    strcmp (data->pageid, "20.receive_options") == 0) {
 		CamelURL *url;
 
 		url = camel_url_new(e_account_get_string(target->account,  E_ACCOUNT_SOURCE_URL), NULL);
 		/* Note: we only care about exchange url's, we WILL get called on all other url's too. */
 		if (url != NULL
 		    && strcmp(url->protocol, "exchange") == 0
-		    && (url->host == NULL || url->host[0] == 0))
+		    && (url->host == NULL || !strlen (url->host)))
 			status = FALSE;
 
 		if (url)
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-account-setup/ChangeLog,v
retrieving revision 1.20
diff -u -r1.20 ChangeLog
--- ChangeLog	23 Feb 2005 06:11:58 -0000	1.20
+++ ChangeLog	26 Feb 2005 06:08:19 -0000
@@ -1,3 +1,10 @@
+2005-02-25  Sushma Rai  <rsushma novell com>
+
+	* exchange-account-setup.c (org_gnome_exchange_check_options):
+	Returning FALSE on NULL host name or set to "", so that one can
+	proceed with the account creation only after hostname is retrived
+	and set by validate().
+
 2005-02-21  Not Zed  <NotZed Ximian com>
 
 	* exchange-account-setup.c (org_gnome_exchange_owa_url): if the


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