1
0
mirror of https://github.com/bitwarden/server synced 2026-01-25 22:03:33 +00:00

last few changes.

This commit is contained in:
Jared McCannon
2026-01-23 15:04:26 -06:00
parent b3e1633526
commit bf7e903959
3 changed files with 10 additions and 3 deletions

View File

@@ -704,7 +704,7 @@ public class OrganizationUsersController : BaseAdminConsoleController
[HttpPut("{id}/restore/vnext")]
[Authorize<ManageUsersRequirement>]
[RequireFeature(FeatureFlagKeys.DefaultUserCollectionRestore)]
public async Task RestoreAsync_vNext(Guid orgId, Guid id, OrganizationUserRestoreRequest request)
public async Task RestoreAsync_vNext(Guid orgId, Guid id, [FromBody] OrganizationUserRestoreRequest request)
{
await RestoreOrRevokeUserAsync(orgId, id, (orgUser, userId) => _restoreOrganizationUserCommand.RestoreUserAsync(orgUser, userId, request.DefaultUserCollectionName));
}

View File

@@ -121,6 +121,9 @@ public class OrganizationUserBulkRequestModel
{
[Required, MinLength(1)]
public IEnumerable<Guid> Ids { get; set; } = new List<Guid>();
[EncryptedString]
[EncryptedStringLength(1000)]
public string? DefaultUserCollectionName { get; set; }
}
#nullable disable

View File

@@ -1,9 +1,13 @@
namespace Bit.Api.AdminConsole.Models.Request.Organizations;
using Bit.Core.Utilities;
namespace Bit.Api.AdminConsole.Models.Request.Organizations;
public class OrganizationUserRestoreRequest
{
/// <summary>
/// This is the encrypted default collection name to be used for restored users if required
/// </summary>
public string DefaultUserCollectionName { get; set; } = string.Empty;
[EncryptedString]
[EncryptedStringLength(1000)]
public string? DefaultUserCollectionName { get; set; }
}