mirror of
https://github.com/bitwarden/server
synced 2026-01-29 07:43:22 +00:00
Minor changes
This commit is contained in:
@@ -56,7 +56,7 @@ public class Program
|
||||
[Option('g', "groups", Description = "Number of groups to create (required, minimum 1)")]
|
||||
int groups,
|
||||
[Option('m', "mix-user-statuses", Description = "Use realistic status mix (85% confirmed, 5% each invited/accepted/revoked). Requires >= 10 users.")]
|
||||
bool mixStatuses = false,
|
||||
bool mixStatuses = true,
|
||||
[Option('o', "org-structure", Description = "Org structure for collections: Traditional, Spotify, or Modern")]
|
||||
string? structure = null
|
||||
)
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user