mirror of
https://github.com/bitwarden/server.git
synced 2025-07-04 17:42:49 -05:00
[Reset Password] Admin reset actions (#1272)
* [Reset Password] Admin reset actions * Updated thrown except for permission collision * Updated GET/PUT password reset to use orgUser.Id for db operations
This commit is contained in:
29
src/Core/Models/Data/OrganizationUserResetPasswordDetails.cs
Normal file
29
src/Core/Models/Data/OrganizationUserResetPasswordDetails.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Models.Table;
|
||||
|
||||
namespace Bit.Core.Models.Data
|
||||
{
|
||||
public class OrganizationUserResetPasswordDetails
|
||||
{
|
||||
public OrganizationUserResetPasswordDetails(OrganizationUser orgUser, User user)
|
||||
{
|
||||
if (orgUser == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(orgUser));
|
||||
}
|
||||
|
||||
if (user == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(user));
|
||||
}
|
||||
|
||||
Kdf = user.Kdf;
|
||||
KdfIterations = user.KdfIterations;
|
||||
ResetPasswordKey = orgUser.ResetPasswordKey;
|
||||
}
|
||||
public KdfType Kdf { get; set; }
|
||||
public int KdfIterations { get; set; }
|
||||
public string ResetPasswordKey { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user