]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
acl: ACLs apply to private flags as well. Fixed returning READ-ONLY resp-code.
authorTimo Sirainen <tss@iki.fi>
Mon, 23 May 2011 12:45:44 +0000 (15:45 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 23 May 2011 12:45:44 +0000 (15:45 +0300)
src/plugins/acl/acl-mailbox.c

index 0a500edb199767442947c477bf9ad8f177fd4128..120640dd472706d3d5829fc625fa835f38ed4b48 100644 (file)
@@ -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;