1
0
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:
Vincent Salucci
2021-03-30 09:48:52 -05:00
committed by GitHub
parent 339292f536
commit 296e3d881d
9 changed files with 40 additions and 0 deletions

View File

@ -84,4 +84,9 @@ namespace Bit.Core.Models.Api
[Required]
public IEnumerable<string> GroupIds { get; set; }
}
public class OrganizationUserResetPasswordEnrollmentRequestModel
{
public string ResetPasswordKey { get; set; }
}
}

View File

@ -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; }
}
}

View File

@ -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; }
}
}

View File

@ -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()
{

View File

@ -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; }