]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
acl: Don't use dovecot-acl-list with public namespaces.
authorTimo Sirainen <tss@iki.fi>
Fri, 28 Aug 2009 15:38:06 +0000 (11:38 -0400)
committerTimo Sirainen <tss@iki.fi>
Fri, 28 Aug 2009 15:38:06 +0000 (11:38 -0400)
All mailboxes in a public namespace are typically in dovecot-acl-list anyway.

--HG--
branch : HEAD

src/plugins/acl/acl-mailbox-list.c

index 9797e59aeb63992fb6667b5f35ce6f4d4e5f43ad..a0e1c5b179280891b96f696a7ab7b160bf7f02ac 100644 (file)
@@ -99,6 +99,12 @@ acl_mailbox_try_list_fast(struct acl_mailbox_list_iterate_context *ctx)
                               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;