mirror of
https://github.com/bitwarden/server.git
synced 2025-04-05 13:08:17 -05:00
Variable/Field/Property renames
This commit is contained in:
parent
44b817ad03
commit
5f41d1eb23
@ -43,7 +43,7 @@ public class InviteOrganizationUsersCommand(IEventService eventService,
|
|||||||
|
|
||||||
public async Task<CommandResult<ScimInviteOrganizationUsersResponse>> InviteScimOrganizationUserAsync(OrganizationUserSingleEmailInvite request)
|
public async Task<CommandResult<ScimInviteOrganizationUsersResponse>> 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);
|
var orgUsers = await organizationUserRepository.GetManyDetailsByOrganizationAsync(request.InviteOrganization.OrganizationId);
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ public class InviteOrganizationUsersCommand(IEventService eventService,
|
|||||||
new UserAlreadyExistsError(new ScimInviteOrganizationUsersResponse(request)));
|
new UserAlreadyExistsError(new ScimInviteOrganizationUsersResponse(request)));
|
||||||
}
|
}
|
||||||
|
|
||||||
var result = await InviteOrganizationUsersAsync(new InviteOrganizationUsersRequest(request, hasSecretsManager));
|
var result = await InviteOrganizationUsersAsync(new InviteOrganizationUsersRequest(request, hasSecretsManagerStandalone));
|
||||||
|
|
||||||
switch (result)
|
switch (result)
|
||||||
{
|
{
|
||||||
|
@ -26,7 +26,7 @@ public class CreateOrganizationUser
|
|||||||
CreationDate = performedAt.UtcDateTime,
|
CreationDate = performedAt.UtcDateTime,
|
||||||
RevisionDate = performedAt.UtcDateTime
|
RevisionDate = performedAt.UtcDateTime
|
||||||
},
|
},
|
||||||
Collections = o.AccessibleCollections,
|
Collections = o.AssignedCollections,
|
||||||
Groups = o.Groups
|
Groups = o.Groups
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ namespace Bit.Core.AdminConsole.OrganizationFeatures.OrganizationUsers.InviteUse
|
|||||||
public class OrganizationUserInvite
|
public class OrganizationUserInvite
|
||||||
{
|
{
|
||||||
public string[] Emails { get; private init; } = [];
|
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 OrganizationUserType Type { get; private init; } = OrganizationUserType.User;
|
||||||
public Permissions Permissions { get; private init; } = new();
|
public Permissions Permissions { get; private init; } = new();
|
||||||
public string ExternalId { get; private init; } = string.Empty;
|
public string ExternalId { get; private init; } = string.Empty;
|
||||||
@ -34,7 +34,7 @@ public class OrganizationUserInvite
|
|||||||
return new OrganizationUserInvite
|
return new OrganizationUserInvite
|
||||||
{
|
{
|
||||||
Emails = emails,
|
Emails = emails,
|
||||||
AccessibleCollections = accessibleCollections.ToArray(),
|
AssignedCollections = accessibleCollections.ToArray(),
|
||||||
Type = type,
|
Type = type,
|
||||||
Permissions = permissions,
|
Permissions = permissions,
|
||||||
ExternalId = externalId,
|
ExternalId = externalId,
|
||||||
|
@ -6,7 +6,7 @@ namespace Bit.Core.AdminConsole.OrganizationFeatures.OrganizationUsers.InviteUse
|
|||||||
public class OrganizationUserInviteDto
|
public class OrganizationUserInviteDto
|
||||||
{
|
{
|
||||||
public string Email { get; private init; } = string.Empty;
|
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 string ExternalId { get; private init; } = string.Empty;
|
||||||
public Permissions Permissions { get; private init; } = new();
|
public Permissions Permissions { get; private init; } = new();
|
||||||
public OrganizationUserType Type { get; private init; } = OrganizationUserType.User;
|
public OrganizationUserType Type { get; private init; } = OrganizationUserType.User;
|
||||||
@ -19,7 +19,7 @@ public class OrganizationUserInviteDto
|
|||||||
return new OrganizationUserInviteDto
|
return new OrganizationUserInviteDto
|
||||||
{
|
{
|
||||||
Email = email,
|
Email = email,
|
||||||
AccessibleCollections = invite.AccessibleCollections,
|
AssignedCollections = invite.AssignedCollections,
|
||||||
ExternalId = invite.ExternalId,
|
ExternalId = invite.ExternalId,
|
||||||
Type = invite.Type,
|
Type = invite.Type,
|
||||||
Permissions = invite.Permissions,
|
Permissions = invite.Permissions,
|
||||||
|
@ -50,6 +50,6 @@ public class InviteOrganizationUsersRequestTests
|
|||||||
|
|
||||||
Assert.NotNull(invite);
|
Assert.NotNull(invite);
|
||||||
Assert.Contains(validEmail, invite.Emails);
|
Assert.Contains(validEmail, invite.Emails);
|
||||||
Assert.Contains(validCollectionConfiguration, invite.AccessibleCollections);
|
Assert.Contains(validCollectionConfiguration, invite.AssignedCollections);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user