]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm acl debug: Show also if mailbox has private flags.
authorTimo Sirainen <tss@iki.fi>
Fri, 4 Mar 2011 15:51:46 +0000 (17:51 +0200)
committerTimo Sirainen <tss@iki.fi>
Fri, 4 Mar 2011 15:51:46 +0000 (17:51 +0200)
src/plugins/acl/doveadm-acl.c

index f9000d0b5e1cbbc51c3fef7974a6d35920ea6ec1..42dc8030fc50a15f359b5b51c2b29f89a56fea00 100644 (file)
@@ -3,6 +3,7 @@
 #include "lib.h"
 #include "str.h"
 #include "module-dir.h"
+#include "imap-util.h"
 #include "acl-plugin.h"
 #include "acl-api-private.h"
 #include "acl-lookup-dict.h"
@@ -300,8 +301,17 @@ static bool cmd_acl_debug_mailbox(struct mailbox *box)
        struct acl_mailbox_list_context *iter;
        struct acl_lookup_dict_iter *diter;
        const char *const *rights, *name;
+       string_t *str;
        int ret;
 
+       if (box->private_flags_mask == 0)
+               i_info("All message flags are shared across users in mailbox");
+       else {
+               str = t_str_new(64);
+               imap_write_flags(str, box->private_flags_mask, NULL);
+               i_info("Per-user private flags in mailbox: %s", str_c(str));
+       }
+
        /* check if user has lookup right */
        if (acl_object_get_my_rights(aclobj, pool_datastack_create(),
                                     &rights) < 0)