From: Timo Sirainen Date: Mon, 23 May 2011 12:45:44 +0000 (+0300) Subject: acl: ACLs apply to private flags as well. Fixed returning READ-ONLY resp-code. X-Git-Tag: 2.1.alpha1~251 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=026be738ed56c8be10d048ef7b684ef5e05e5bea;p=thirdparty%2Fdovecot%2Fcore.git acl: ACLs apply to private flags as well. Fixed returning READ-ONLY resp-code. --- diff --git a/src/plugins/acl/acl-mailbox.c b/src/plugins/acl/acl-mailbox.c index 0a500edb19..120640dd47 100644 --- a/src/plugins/acl/acl-mailbox.c +++ b/src/plugins/acl/acl-mailbox.c @@ -64,7 +64,6 @@ static bool acl_is_readonly(struct mailbox *box) { struct acl_mailbox *abox = ACL_CONTEXT(box); enum acl_storage_rights save_right; - enum mail_flags private_flags_mask; if (abox->module_ctx.super.is_readonly(box)) return TRUE; @@ -76,16 +75,11 @@ static bool acl_is_readonly(struct mailbox *box) if (acl_mailbox_right_lookup(box, ACL_STORAGE_RIGHT_EXPUNGE) > 0) return FALSE; - /* Next up is the "shared flag rights" */ if (acl_mailbox_right_lookup(box, ACL_STORAGE_RIGHT_WRITE) > 0) return FALSE; - - private_flags_mask = mailbox_get_private_flags_mask(box); - if ((private_flags_mask & MAIL_DELETED) == 0 && - acl_mailbox_right_lookup(box, ACL_STORAGE_RIGHT_WRITE_DELETED) > 0) + if (acl_mailbox_right_lookup(box, ACL_STORAGE_RIGHT_WRITE_DELETED) > 0) return FALSE; - if ((private_flags_mask & MAIL_SEEN) == 0 && - acl_mailbox_right_lookup(box, ACL_STORAGE_RIGHT_WRITE_SEEN) > 0) + if (acl_mailbox_right_lookup(box, ACL_STORAGE_RIGHT_WRITE_SEEN) > 0) return FALSE; return TRUE;