Mercurial > dovecot > original-hg > dovecot-1.2
changeset 8959:33f3016673aa HEAD
imap-quota: Allow GETQUOTAROOT for public namespaces.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 16 Apr 2009 21:56:20 -0400 |
parents | 16c286aee307 |
children | 56b21ef694cc |
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:31:30 2009 -0400 +++ b/src/plugins/imap-quota/imap-quota-plugin.c Thu Apr 16 21:56:20 2009 -0400 @@ -22,7 +22,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); @@ -92,12 +92,13 @@ } ns = mail_storage_get_namespace(storage); - if (quota_set == NULL || ns->owner == NULL) { + if (quota_set == 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;