# HG changeset patch # User Timo Sirainen # Date 1183411848 -10800 # Node ID 38ff50597e543657e2d6e6d92f79e92b408761be # Parent cff0694678842a983ec0628d0522543f8f867480 Owner parameter wasn't set correctly. Take user's groups from acl_groups environment. diff -r cff069467884 -r 38ff50597e54 src/plugins/acl/acl-mailbox-list.c --- a/src/plugins/acl/acl-mailbox-list.c Mon Jul 02 23:53:22 2007 +0300 +++ b/src/plugins/acl/acl-mailbox-list.c Tue Jul 03 00:30:48 2007 +0300 @@ -353,6 +353,7 @@ struct mail_namespace *ns; enum mailbox_list_flags flags; const char *acl_env, *current_username, *owner_username; + bool owner = TRUE; if (acl_next_hook_mailbox_list_created != NULL) acl_next_hook_mailbox_list_created(list); @@ -367,17 +368,21 @@ current_username = getenv("MASTER_USER"); if (current_username == NULL) current_username = owner_username; + else + owner = strcmp(current_username, owner_username) == 0; /* We don't care about the username for non-private mailboxes. It's used only when checking if we're the mailbox owner. We never are for shared/public mailboxes. */ ns = mailbox_list_get_namespace(list); if (ns->type != NAMESPACE_PRIVATE) - owner_username = NULL; + owner = FALSE; /* FIXME: set groups */ - backend = acl_backend_init(acl_env, list, current_username, NULL, - owner_username); + backend = acl_backend_init(acl_env, list, current_username, + getenv("ACL_GROUPS") == NULL ? NULL : + t_strsplit(getenv("ACL_GROUPS"), ","), + owner); if (backend == NULL) i_fatal("ACL backend initialization failed");