Mercurial > dovecot > core-2.2
changeset 14614:544dc10d4b04
acl: Optimize failing mailbox_move() when expunge right is missing.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 20 Jun 2012 06:17:00 +0300 |
parents | 8d596b5adbab |
children | 0a2126680120 |
files | src/plugins/acl/acl-mailbox.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/acl/acl-mailbox.c Wed Jun 20 06:15:46 2012 +0300 +++ b/src/plugins/acl/acl-mailbox.c Wed Jun 20 06:17:00 2012 +0300 @@ -392,6 +392,12 @@ struct acl_mailbox *abox = ACL_CONTEXT(t->box); enum acl_storage_rights save_right; + if (ctx->moving) { + if (acl_mailbox_right_lookup(mail->box, + ACL_STORAGE_RIGHT_EXPUNGE) <= 0) + return -1; + } + save_right = (t->box->flags & MAILBOX_FLAG_POST_SESSION) != 0 ? ACL_STORAGE_RIGHT_POST : ACL_STORAGE_RIGHT_INSERT; if (acl_mailbox_right_lookup(t->box, save_right) <= 0)