1
0
mirror of https://github.com/bitwarden/server synced 2026-03-01 10:51:26 +00:00

Seeder/resolve owner roster quirk (#7059)

This commit is contained in:
Mick Letofsky
2026-02-24 07:47:29 +01:00
committed by GitHub
parent 5c77ae9810
commit 60bbf00160
5 changed files with 72 additions and 14 deletions

View File

@@ -45,6 +45,13 @@ internal sealed class CreateRosterStep(string fixtureName) : IStep
var orgUser = org.CreateOrganizationUserWithKey(
user, orgUserType, OrganizationUserStatusType.Confirmed, userOrgKey);
// Promote the first owner-role user to pipeline owner
if (orgUserType == OrganizationUserType.Owner && context.Owner is null)
{
context.Owner = user;
context.OwnerOrgUser = orgUser;
}
userLookup[emailPrefix] = orgUser.Id;
context.Users.Add(user);