changeset 9342:aeb3affa0501 HEAD

acl: Don't use dovecot-acl-list with public namespaces. All mailboxes in a public namespace are typically in dovecot-acl-list anyway.
author Timo Sirainen <tss@iki.fi>
date Fri, 28 Aug 2009 11:37:45 -0400
parents ff4c1e9f47a4
children aaa1b2c25c14
files src/plugins/acl/acl-mailbox-list.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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
@@ -78,6 +78,12 @@
 			       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. */
 	idxp = alist->rights.acl_storage_right_idx + ACL_STORAGE_RIGHT_LOOKUP;