From: Timo Sirainen Date: Sun, 16 Nov 2008 14:29:47 +0000 (+0200) Subject: Fixed OPEN_IGNORE_ACLS flag to work again with imap-acl plugin. X-Git-Tag: 1.2.alpha4~60 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=db9f053331a7bb144d32a2331e666cb1d2be5766;p=thirdparty%2Fdovecot%2Fcore.git Fixed OPEN_IGNORE_ACLS flag to work again with imap-acl plugin. --HG-- branch : HEAD --- diff --git a/src/plugins/acl/acl-mailbox.c b/src/plugins/acl/acl-mailbox.c index eec68fa362..98359507f4 100644 --- a/src/plugins/acl/acl-mailbox.c +++ b/src/plugins/acl/acl-mailbox.c @@ -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; } diff --git a/src/plugins/acl/acl-storage.c b/src/plugins/acl/acl-storage.c index a5bd51a4ad..1075071e4d 100644 --- a/src/plugins/acl/acl-storage.c +++ b/src/plugins/acl/acl-storage.c @@ -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); }