Mercurial > dovecot > core-2.2
changeset 9130:8517afb01903 HEAD
imap-quota: Allow GETQUOTAROOT for public namespaces.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 16 Apr 2009 21:58:20 -0400 |
parents | f9c07af22f91 |
children | 6284c1ff3e34 |
files | src/plugins/imap-quota/imap-quota-plugin.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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;