# HG changeset patch # User Timo Sirainen # Date 1239933500 14400 # Node ID 8517afb0190397c8051dd7c274d90df914bcba0f # Parent f9c07af22f91cd5be0a9b1fcfd5db2f9500a3e50 imap-quota: Allow GETQUOTAROOT for public namespaces. diff -r f9c07af22f91 -r 8517afb01903 src/plugins/imap-quota/imap-quota-plugin.c --- a/src/plugins/imap-quota/imap-quota-plugin.c Thu Apr 16 21:56:54 2009 -0400 +++ b/src/plugins/imap-quota/imap-quota-plugin.c Thu Apr 16 21:58:20 2009 -0400 @@ -23,7 +23,7 @@ const char *name; name = quota_root_get_name(root); - if (user == owner) + if (user == owner || owner == NULL) return name; return t_strdup_printf("%s%c%s", owner->username, QUOTA_USER_SEPARATOR, name); @@ -94,12 +94,13 @@ } ns = mail_storage_get_namespace(storage); - if (quser == NULL || ns->owner == NULL) { + if (quser == NULL) { mailbox_close(&box); client_send_tagline(cmd, "OK No quota."); return TRUE; } - if (ns->owner != client->user && !client->user->admin) { + if (ns->owner != NULL && ns->owner != client->user && + !client->user->admin) { mailbox_close(&box); client_send_tagline(cmd, "NO Not showing other users' quota."); return TRUE;