]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
acl: Ignore acls in acl_mailbox_right_lookup if ignore_acls is set
authorMarkus Valentin <markus.valentin@open-xchange.com>
Wed, 2 Jun 2021 10:39:39 +0000 (12:39 +0200)
committerMarkus Valentin <markus.valentin@open-xchange.com>
Wed, 2 Jun 2021 10:43:48 +0000 (12:43 +0200)
In case an namespace has been configured to ignore ACLs make sure that
also happens for acl_mailbox_right_lookup.

src/plugins/acl/acl-mailbox.c

index 7cc8775990ee7de29389dc94f0bf20f83525e924..64235d42ddd06ab84e8120dc578a7e74eb81b4a4 100644 (file)
@@ -41,6 +41,11 @@ int acl_mailbox_right_lookup(struct mailbox *box, unsigned int right_idx)
 
        struct acl_mailbox_list *alist = ACL_LIST_CONTEXT_REQUIRE(box->list);
 
+       /* If acls are ignored for this namespace do not check if
+          there are rights. */
+       if (alist->ignore_acls)
+               return 1;
+
        ret = acl_object_have_right(abox->aclobj,
                        alist->rights.acl_storage_right_idx[right_idx]);
        if (ret > 0)