mirror of
https://github.com/bitwarden/server
synced 2026-01-25 22:03:33 +00:00
last few changes.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user