]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
plugins: acl - Remove unused acl_mail_namespace_storage_added()
authorAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 15 Dec 2023 11:12:48 +0000 (13:12 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 12 Feb 2025 10:34:11 +0000 (12:34 +0200)
src/plugins/acl/acl-mailbox-list.c
src/plugins/acl/acl-plugin.h

index 1393e83dc118c3d144ae4f75f67352c9af48c95e..f4eeabe5eef9353b327299ae0d7c04b691e94439 100644 (file)
@@ -585,38 +585,6 @@ static void acl_mailbox_list_init_default(struct mailbox_list *list)
        MODULE_CONTEXT_SET(list, acl_mailbox_list_module, alist);
 }
 
-void acl_mail_namespace_storage_added(struct mail_namespace *ns)
-{
-       struct acl_mailbox_list *alist = ACL_LIST_CONTEXT(ns->list);
-       struct acl_backend *backend;
-       const char *current_username, *owner_username;
-       bool owner = TRUE;
-
-       if (alist == NULL)
-               return;
-       struct acl_user *auser = ACL_USER_CONTEXT_REQUIRE(ns->user);
-
-       owner_username = ns->user->username;
-       current_username = auser->set->acl_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. */
-       if (ns->type != MAIL_NAMESPACE_TYPE_PRIVATE)
-               owner = FALSE;
-
-       /* we need to know the storage when initializing backend */
-       backend = acl_backend_init(auser->acl_env, ns->list, current_username,
-                                  auser->set, owner);
-       if (backend == NULL)
-               i_fatal("ACL backend initialization failed");
-       acl_storage_rights_ctx_init(&alist->rights, backend);
-}
-
 void acl_mailbox_list_created(struct mailbox_list *list)
 {
        struct acl_user *auser = ACL_USER_CONTEXT(list->ns->user);
index 0138632ae4ffabdb9cc473141313be0b54d8658c..b80c5a06a3b0219cb3c5d7a9858306e3e6f48e6f 100644 (file)
@@ -56,7 +56,6 @@ extern MODULE_CONTEXT_DEFINE(acl_mailbox_list_module,
                             &mailbox_list_module_register);
 
 void acl_mailbox_list_created(struct mailbox_list *list);
-void acl_mail_namespace_storage_added(struct mail_namespace *ns);
 void acl_mail_user_created(struct mail_user *list);
 
 void acl_mailbox_allocated(struct mailbox *box);