diff options
author | Sushma Rai <rsushma@src.gnome.org> | 2006-07-22 17:09:20 +0800 |
---|---|---|
committer | Sushma Rai <rsushma@src.gnome.org> | 2006-07-22 17:09:20 +0800 |
commit | 55675f968d10d5c11db24286e4f8a315e616f00f (patch) | |
tree | ffc6648701d8248587541cb74ee5d0e20cd8dfd5 /plugins/exchange-operations | |
parent | 17e5226c6092aa230a72058ac56a2a9a13e1c7cb (diff) | |
download | gsoc2013-evolution-55675f968d10d5c11db24286e4f8a315e616f00f.tar gsoc2013-evolution-55675f968d10d5c11db24286e4f8a315e616f00f.tar.gz gsoc2013-evolution-55675f968d10d5c11db24286e4f8a315e616f00f.tar.bz2 gsoc2013-evolution-55675f968d10d5c11db24286e4f8a315e616f00f.tar.lz gsoc2013-evolution-55675f968d10d5c11db24286e4f8a315e616f00f.tar.xz gsoc2013-evolution-55675f968d10d5c11db24286e4f8a315e616f00f.tar.zst gsoc2013-evolution-55675f968d10d5c11db24286e4f8a315e616f00f.zip |
Checking if a user is subscribing to his own folder. Fixes #311322.
Patch submitted by "Vandana Shenoy .B <shvandana@novell.com>"
svn path=/trunk/; revision=32374
Diffstat (limited to 'plugins/exchange-operations')
-rw-r--r-- | plugins/exchange-operations/ChangeLog | 6 | ||||
-rw-r--r-- | plugins/exchange-operations/exchange-folder-subscription.c | 13 |
2 files changed, 19 insertions, 0 deletions
diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog index bbf4a22930..014968dc71 100644 --- a/plugins/exchange-operations/ChangeLog +++ b/plugins/exchange-operations/ChangeLog @@ -1,3 +1,9 @@ +2006-07-22 Sushma Rai <rsushma@novell.com> + + * exchange-folder-subscription.c (subscribe_to_folder): Checking if a + user is subscribing to his own folder. Fixes #311322. + Patch submitted by "Vandana Shenoy .B <shvandana@novell.com>" + 2006-07-18 Andre Klapper <a9016009@gmx.de> * exchange-change-password.glade: diff --git a/plugins/exchange-operations/exchange-folder-subscription.c b/plugins/exchange-operations/exchange-folder-subscription.c index 122366d9fb..2c75af875b 100644 --- a/plugins/exchange-operations/exchange-folder-subscription.c +++ b/plugins/exchange-operations/exchange-folder-subscription.c @@ -189,6 +189,7 @@ subscribe_to_folder (GtkWidget *dialog, gint response, gpointer data) { SubscriptionInfo *subscription_info = data; gchar *user_email_address = NULL, *folder_name = NULL, *path = NULL; + char *subscriber_email; EFolder *folder = NULL; EDestinationStore *destination_store; GList *destinations; @@ -213,6 +214,18 @@ subscribe_to_folder (GtkWidget *dialog, gint response, gpointer data) if (user_email_address != NULL && *user_email_address != '\0') break; + /* check if user is trying to subscribe to his own folder */ + subscriber_email = exchange_account_get_email_id (subscription_info->account); + if (subscriber_email != NULL && *subscriber_email != '\0') { + if (g_str_equal (subscriber_email, user_email_address)) { + e_error_run (NULL, ERROR_DOMAIN ":folder-exists-error", NULL); + g_free (user_email_address); + gtk_widget_destroy (dialog); + destroy_subscription_info (subscription_info); + return; + } + } + /* It would be nice to insensitivize the OK button appropriately instead of doing this, but unfortunately we can't do this for the Bonobo control. */ |