mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 23:52:50 -05:00
[Reset Password] Enrollment API, Service, and Model updates (#1245)
* [Reset Password] Enrollment API, Service and Model updates * Added conditional check for calling User's ID
This commit is contained in:
@ -84,4 +84,9 @@ namespace Bit.Core.Models.Api
|
||||
[Required]
|
||||
public IEnumerable<string> GroupIds { get; set; }
|
||||
}
|
||||
|
||||
public class OrganizationUserResetPasswordEnrollmentRequestModel
|
||||
{
|
||||
public string ResetPasswordKey { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -30,6 +30,8 @@ namespace Bit.Core.Models.Api
|
||||
SsoBound = !string.IsNullOrWhiteSpace(organization.SsoExternalId);
|
||||
Identifier = organization.Identifier;
|
||||
Permissions = CoreHelpers.LoadClassFromJsonData<Permissions>(organization.Permissions);
|
||||
ResetPasswordKey = organization.ResetPasswordKey;
|
||||
UserId = organization.UserId?.ToString();
|
||||
}
|
||||
|
||||
public string Id { get; set; }
|
||||
@ -55,5 +57,7 @@ namespace Bit.Core.Models.Api
|
||||
public bool SsoBound { get; set; }
|
||||
public string Identifier { get; set; }
|
||||
public Permissions Permissions { get; set; }
|
||||
public string ResetPasswordKey { get; set; }
|
||||
public string UserId { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -28,5 +28,6 @@ namespace Bit.Core.Models.Data
|
||||
public string SsoExternalId { get; set; }
|
||||
public string Identifier { get; set; }
|
||||
public string Permissions { get; set; }
|
||||
public string ResetPasswordKey { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ namespace Bit.Core.Models.Data
|
||||
public string ExternalId { get; set; }
|
||||
public string SsoExternalId { get; set; }
|
||||
public string Permissions { get; set; }
|
||||
public string ResetPasswordKey { get; set; }
|
||||
|
||||
public Dictionary<TwoFactorProviderType, TwoFactorProvider> GetTwoFactorProviders()
|
||||
{
|
||||
|
@ -11,6 +11,7 @@ namespace Bit.Core.Models.Table
|
||||
public Guid? UserId { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string Key { get; set; }
|
||||
public string ResetPasswordKey { get; set; }
|
||||
public OrganizationUserStatusType Status { get; set; }
|
||||
public OrganizationUserType Type { get; set; }
|
||||
public bool AccessAll { get; set; }
|
||||
|
Reference in New Issue
Block a user