bnv-manager-v2: accept_invite creates the Mailcow domain admin before the commit

クローズ 初心者向け
#28 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@myOmikron がすでに取り組んでいます。

2026年10月17日 から。

  • #29 @myOmikron による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust
領域
backend

調査の方向性

services/bnv-manager-v2/src/http/handler_frontend/invites/handler_common.rs の accept_invite から始めてください。create_domain_admin を呼び出す tokio::spawn は tx.commit() より前にあります。同じサービスの set_password と reset_password を読み、トランザクション内でデータをどのように収集し、コミット後に Mailcow::global() を呼び出しているかを確認してください。Mailcow の呼び出しが tx.commit().await? の成功後にのみ実行され、クラブメンバーのパスは変更されていないことが完了の条件です。

索引モデルが issue の本文から書いたものです。

説明

bug ready-for-agent

Problem

accept_invite (services/bnv-manager-v2/src/http/handler_frontend/invites/handler_common.rs) spawns the task that creates the domain admin in Mailcow (create_domain_admin) while the transaction is still open. tx.commit() only runs after that.

If the commit fails (e.g. connection drop), the account and the accepted invite roll back, but the domain admin in Mailcow stays. Accepting the invite again then fails on the existing Mailcow user.

Expected

The Mailcow side effect only runs after a successful commit. set_password and reset_password in the same service already do this: gather what is needed inside the transaction, call Mailcow::global() after tx.commit().

Acceptance criteria

  • In accept_invite, tokio::spawn with create_domain_admin only runs after tx.commit().await?
  • A failed commit leaves no trace in Mailcow
  • Club-member invites (without a Mailcow call) behave unchanged
主要言語
TypeScript
スター
0
フォーク
1
平均マージ
9時間 39分
マージ済み PR(30日)
144

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

myOmikron/code のほかの issue

myOmikron/code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。