From db9f053331a7bb144d32a2331e666cb1d2be5766 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 16 Nov 2008 16:29:47 +0200 Subject: [PATCH] Fixed OPEN_IGNORE_ACLS flag to work again with imap-acl plugin. --HG-- branch : HEAD --- src/plugins/acl/acl-mailbox.c | 20 +++++++++++--------- src/plugins/acl/acl-storage.c | 2 -- 2 files changed, 11 insertions(+), 11 deletions(-) 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); } -- 2.47.3