dovecot: If user didn't have "lookup" right to mailbox, "insert"...

dovecot at dovecot.org dovecot at dovecot.org
Wed Jul 18 00:03:26 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/3ca063521d9a
changeset: 6044:3ca063521d9a
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jul 17 23:58:04 2007 +0300
description:
If user didn't have "lookup" right to mailbox, "insert" right didn't work.

diffstat:

1 file changed, 9 insertions(+)
src/plugins/acl/acl-mailbox-list.c |    9 +++++++++

diffs (19 lines):

diff -r d9abe04fc9ae -r 3ca063521d9a src/plugins/acl/acl-mailbox-list.c
--- a/src/plugins/acl/acl-mailbox-list.c	Tue Jul 17 21:48:42 2007 +0300
+++ b/src/plugins/acl/acl-mailbox-list.c	Tue Jul 17 23:58:04 2007 +0300
@@ -240,6 +240,15 @@ static int acl_get_mailbox_name_status(s
 					  NULL);
 	if (ret < 0)
 		return -1;
+	if (ret == 0) {
+		/* If we have INSERT right for the mailbox, we'll need to
+		   reveal its existence so that APPEND and COPY works. */
+		ret = acl_mailbox_list_have_right(alist, name,
+						  ACL_STORAGE_RIGHT_INSERT,
+						  NULL);
+		if (ret < 0)
+			return -1;
+	}
 
 	if (alist->module_ctx.super.get_mailbox_name_status(list, name,
 							    status) < 0)


More information about the dovecot-cvs mailing list