feat: team onwer give - #7605
Conversation
Coverage Report
File CoverageNo changed files found. |
|
✅ Build and publish successful - Preview fastgpt Image: 🕒 Time: 2026-09-07 10:30:45 (UTC+8) |
|
✅ Admin Preview Image Ready! 🕒 Time: 2026-09-07 10:28:20 (UTC+8) |
e12f826 to
da3b1b8
Compare
48969ef to
d9541eb
Compare
6823fac to
cd9c768
Compare
|
[P2] Preserve active membership when transferring ownership The transaction validates the target member with Please serialize member-status changes with the same team lock, and/or include |
|
P1: The user lock is released before the outer Mongo transaction commits. In packages/service/support/user/team/controller.ts:153-157, createUserLoginTeam runs the fallback check and team creation inside withUserLock, but this function is called from the handler of passwordVerificationService.consumeInTransaction. That outer transaction commits only after the handler returns. Therefore, a second concurrent login with a different valid pre-login code can acquire the lock while the first team inserts are still uncommitted; its transaction cannot see the first team and can create another owner team for the same user. Please keep the lock around the whole transaction, or add a database-level idempotency/serialization guarantee, and add a concurrent-login regression test. |
|
P1: Sync mode ownership transfer can be bypassed through the API. In pro/admin/src/service/support/user/team/controller/changeOwner.ts:62-64, the backend rejects non-WeCom teams only when teamMode is single. The frontend hides the transfer action whenever isSyncMode is true (projects/app/src/pageComponents/account/team/MemberTable.tsx:236-238), but a current team owner can call the endpoint directly in sync mode and transfer ownership of a non-WeCom team. Please enforce the same mode restriction in the backend rather than relying on the UI, and add an API/service regression test for sync mode. |
f47028b to
d4b8f60
Compare
resolved |
resolved |
resolved |
|
[P1] Race condition between owner transfer and member removal (confidence: 9/10)
A concrete interleaving is: removal of member B reads B as a non-owner while A is still the owner; the A -> B transfer then completes; the removal continues and saves B as Please make |
c5bd3b6 to
9b391ce
Compare
7d7ec65 to
d4914a3
Compare
resolved |
86d1e22 to
edfa378
Compare
edfa378 to
5c8fd4f
Compare
FinleyGe
left a comment
There was a problem hiding this comment.
Avaliable for testing.
5c8fd4f to
4a5264a
Compare
4a5264a to
a3a12e0
Compare
现在单团队只有企业微信可以转移
新增多团队的转移,转移时如果没有别的 onwer 团队就新建一个