1
0
mirror of https://github.com/bitwarden/server synced 2026-02-20 03:13:35 +00:00

Minor changes

This commit is contained in:
Mick Letofsky
2026-01-27 15:48:09 +01:00
parent 32b611aa08
commit 045d76cf2e
2 changed files with 4 additions and 4 deletions

View File

@@ -87,7 +87,7 @@ public class OrganizationWithVaultRecipe(
db.BulkCopy(efMemberOrgUsers);
db.SaveChanges();
// Get confirmed user IDs for relationships
// Get confirmed org user IDs for collection/group relationships
var confirmedOrgUserIds = memberOrgUsers
.Where(ou => ou.Status == OrganizationUserStatusType.Confirmed)
.Select(ou => ou.Id)
@@ -129,8 +129,8 @@ public class OrganizationWithVaultRecipe(
var collectionUsers = orgUserIds
.SelectMany((orgUserId, userIndex) =>
{
var collectionCount = (userIndex % 3) + 1;
return Enumerable.Range(0, collectionCount)
var maxAssignments = Math.Min((userIndex % 3) + 1, collections.Count);
return Enumerable.Range(0, maxAssignments)
.Select(j => CollectionSeeder.CreateCollectionUser(
collections[(userIndex + j) % collections.Count].Id,
orgUserId,