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

dovecot at dovecot.org dovecot at dovecot.org
Fri Aug 28 18:37:51 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/aeb3affa0501
changeset: 9342:aeb3affa0501
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Aug 28 11:37:45 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 ff4c1e9f47a4 -r aeb3affa0501 src/plugins/acl/acl-mailbox-list.c
--- a/src/plugins/acl/acl-mailbox-list.c	Fri Aug 28 11:18:26 2009 -0400
+++ b/src/plugins/acl/acl-mailbox-list.c	Fri Aug 28 11:37:45 2009 -0400
@@ -77,6 +77,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