dovecot-2.0: acl: Don't use dovecot-acl-list with public namespa...

dovecot at dovecot.org dovecot at dovecot.org
Fri Aug 28 18:38:14 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/9d55ed4fbd26
changeset: 9817:9d55ed4fbd26
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Aug 28 11:38:06 2009 -0400
description:
acl: Don't use dovecot-acl-list with public namespaces.
All mailboxes in a public namespace are typically in dovecot-acl-list anyway.

diffstat:

1 file changed, 6 insertions(+)
src/plugins/acl/acl-mailbox-list.c |    6 ++++++

diffs (16 lines):

diff -r 11e3058af06c -r 9d55ed4fbd26 src/plugins/acl/acl-mailbox-list.c
--- a/src/plugins/acl/acl-mailbox-list.c	Fri Aug 28 11:05:12 2009 -0400
+++ b/src/plugins/acl/acl-mailbox-list.c	Fri Aug 28 11:38:06 2009 -0400
@@ -98,6 +98,12 @@ acl_mailbox_try_list_fast(struct acl_mai
 	if ((ctx->ctx.flags & (MAILBOX_LIST_ITER_RAW_LIST |
 			       MAILBOX_LIST_ITER_SELECT_SUBSCRIBED)) != 0)
 		return;
+
+	if (ns->type == NAMESPACE_PUBLIC) {
+		/* mailboxes in public namespace should all be listable to
+		   someone. we don't benefit from fast listing. */
+		return;
+	}
 
 	/* if this namespace's default rights contain LOOKUP, we'll need to
 	   go through all mailboxes in any case. */


More information about the dovecot-cvs mailing list