]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Fixed OPEN_IGNORE_ACLS flag to work again with imap-acl plugin.
authorTimo Sirainen <tss@iki.fi>
Sun, 16 Nov 2008 14:29:47 +0000 (16:29 +0200)
committerTimo Sirainen <tss@iki.fi>
Sun, 16 Nov 2008 14:29:47 +0000 (16:29 +0200)
--HG--
branch : HEAD

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

index eec68fa3620096a9ebd7d559fde5a0d2a226ded9..98359507f4e09b769d0630583b4d1e9394335f91 100644 (file)
@@ -354,15 +354,17 @@ struct mailbox *acl_mailbox_open_box(struct mailbox *box)
        abox->aclobj = acl_object_init_from_name(astorage->rights.backend,
                                                 box->storage,
                                                 mailbox_get_name(box));
-       
-       box->v.is_readonly = acl_is_readonly;
-       box->v.allow_new_keywords = acl_allow_new_keywords;
-       box->v.close = acl_mailbox_close;
-       box->v.mail_alloc = acl_mail_alloc;
-       box->v.save_begin = acl_save_begin;
-       box->v.keywords_create = acl_keywords_create;
-       box->v.copy = acl_copy;
-       box->v.transaction_commit = acl_transaction_commit;
+
+       if ((box->open_flags & MAILBOX_OPEN_IGNORE_ACLS) == 0) {
+               box->v.is_readonly = acl_is_readonly;
+               box->v.allow_new_keywords = acl_allow_new_keywords;
+               box->v.close = acl_mailbox_close;
+               box->v.mail_alloc = acl_mail_alloc;
+               box->v.save_begin = acl_save_begin;
+               box->v.keywords_create = acl_keywords_create;
+               box->v.copy = acl_copy;
+               box->v.transaction_commit = acl_transaction_commit;
+       }
        MODULE_CONTEXT_SET(box, acl_storage_module, abox);
        return box;
 }
index a5bd51a4add946e768bf0a7b7a777cae09adb608..1075071e4db6518bd896c1da6d9906e393b7e707 100644 (file)
@@ -131,8 +131,6 @@ acl_mailbox_open(struct mail_storage *storage, const char *name,
        if (box == NULL)
                return NULL;
 
-       if ((flags & MAILBOX_OPEN_IGNORE_ACLS) != 0)
-               return box;
        return acl_mailbox_open_box(box);
 }