From 5f41d1eb23917111a4e8112aeec1ee68a9a28aa3 Mon Sep 17 00:00:00 2001 From: jrmccannon Date: Mon, 24 Mar 2025 12:33:02 -0500 Subject: [PATCH] Variable/Field/Property renames --- .../InviteUsers/InviteOrganizationUsersCommand.cs | 4 ++-- .../InviteUsers/Models/CreateOrganizationUser.cs | 2 +- .../InviteUsers/Models/OrganizationUserInvite.cs | 4 ++-- .../InviteUsers/Models/OrganizationUserInviteDto.cs | 4 ++-- .../Models/InviteOrganizationUsersRequestTests.cs | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/InviteOrganizationUsersCommand.cs b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/InviteOrganizationUsersCommand.cs index 97bdf9445c..eaf8892493 100644 --- a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/InviteOrganizationUsersCommand.cs +++ b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/InviteOrganizationUsersCommand.cs @@ -43,7 +43,7 @@ public class InviteOrganizationUsersCommand(IEventService eventService, public async Task> InviteScimOrganizationUserAsync(OrganizationUserSingleEmailInvite request) { - var hasSecretsManager = await paymentService.HasSecretsManagerStandalone(request.InviteOrganization); + var hasSecretsManagerStandalone = await paymentService.HasSecretsManagerStandalone(request.InviteOrganization); var orgUsers = await organizationUserRepository.GetManyDetailsByOrganizationAsync(request.InviteOrganization.OrganizationId); @@ -55,7 +55,7 @@ public class InviteOrganizationUsersCommand(IEventService eventService, new UserAlreadyExistsError(new ScimInviteOrganizationUsersResponse(request))); } - var result = await InviteOrganizationUsersAsync(new InviteOrganizationUsersRequest(request, hasSecretsManager)); + var result = await InviteOrganizationUsersAsync(new InviteOrganizationUsersRequest(request, hasSecretsManagerStandalone)); switch (result) { diff --git a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Models/CreateOrganizationUser.cs b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Models/CreateOrganizationUser.cs index 107dfcd838..2fc40e37c3 100644 --- a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Models/CreateOrganizationUser.cs +++ b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Models/CreateOrganizationUser.cs @@ -26,7 +26,7 @@ public class CreateOrganizationUser CreationDate = performedAt.UtcDateTime, RevisionDate = performedAt.UtcDateTime }, - Collections = o.AccessibleCollections, + Collections = o.AssignedCollections, Groups = o.Groups }; } diff --git a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Models/OrganizationUserInvite.cs b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Models/OrganizationUserInvite.cs index 550c0be635..08e7d5c2ad 100644 --- a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Models/OrganizationUserInvite.cs +++ b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Models/OrganizationUserInvite.cs @@ -10,7 +10,7 @@ namespace Bit.Core.AdminConsole.OrganizationFeatures.OrganizationUsers.InviteUse public class OrganizationUserInvite { public string[] Emails { get; private init; } = []; - public CollectionAccessSelection[] AccessibleCollections { get; private init; } = []; + public CollectionAccessSelection[] AssignedCollections { get; private init; } = []; public OrganizationUserType Type { get; private init; } = OrganizationUserType.User; public Permissions Permissions { get; private init; } = new(); public string ExternalId { get; private init; } = string.Empty; @@ -34,7 +34,7 @@ public class OrganizationUserInvite return new OrganizationUserInvite { Emails = emails, - AccessibleCollections = accessibleCollections.ToArray(), + AssignedCollections = accessibleCollections.ToArray(), Type = type, Permissions = permissions, ExternalId = externalId, diff --git a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Models/OrganizationUserInviteDto.cs b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Models/OrganizationUserInviteDto.cs index b8da695f4f..2f50225a66 100644 --- a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Models/OrganizationUserInviteDto.cs +++ b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Models/OrganizationUserInviteDto.cs @@ -6,7 +6,7 @@ namespace Bit.Core.AdminConsole.OrganizationFeatures.OrganizationUsers.InviteUse public class OrganizationUserInviteDto { public string Email { get; private init; } = string.Empty; - public CollectionAccessSelection[] AccessibleCollections { get; private init; } = []; + public CollectionAccessSelection[] AssignedCollections { get; private init; } = []; public string ExternalId { get; private init; } = string.Empty; public Permissions Permissions { get; private init; } = new(); public OrganizationUserType Type { get; private init; } = OrganizationUserType.User; @@ -19,7 +19,7 @@ public class OrganizationUserInviteDto return new OrganizationUserInviteDto { Email = email, - AccessibleCollections = invite.AccessibleCollections, + AssignedCollections = invite.AssignedCollections, ExternalId = invite.ExternalId, Type = invite.Type, Permissions = invite.Permissions, diff --git a/test/Core.Test/AdminConsole/Models/InviteOrganizationUsersRequestTests.cs b/test/Core.Test/AdminConsole/Models/InviteOrganizationUsersRequestTests.cs index 1398e58999..a08ecd0f84 100644 --- a/test/Core.Test/AdminConsole/Models/InviteOrganizationUsersRequestTests.cs +++ b/test/Core.Test/AdminConsole/Models/InviteOrganizationUsersRequestTests.cs @@ -50,6 +50,6 @@ public class InviteOrganizationUsersRequestTests Assert.NotNull(invite); Assert.Contains(validEmail, invite.Emails); - Assert.Contains(validCollectionConfiguration, invite.AccessibleCollections); + Assert.Contains(validCollectionConfiguration, invite.AssignedCollections); } }