mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-19 05:33:31 +01:00
6290b0f3bf
* Users list: Cleanups * Policies: Flip registration settings * Policies: Add RequireUserApproval setting * Add approval to user * Require approval on login and for API key * API handling * AccountController cleanups * Test fix * Apply suggestions from code review Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com> * Add missing imports * Communicate login requirements to user on account creation * Add login requirements to basic auth handler * Cleanups and test fix * Encapsulate approval logic in user service and log approval changes * Send follow up "Account approved" email Closes #5656. * Add notification for admins * Fix creating a user via the admin view * Update list: Unify flags into status column, add approve action * Adjust "Resend email" wording * Incorporate feedback from code review * Remove duplicate test server policy reset --------- Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
52 lines
1.4 KiB
C#
52 lines
1.4 KiB
C#
using System;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace BTCPayServer.Client.Models
|
|
{
|
|
public class ApplicationUserData
|
|
{
|
|
/// <summary>
|
|
/// the id of the user
|
|
/// </summary>
|
|
public string Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// the email AND username of the user
|
|
/// </summary>
|
|
public string Email { get; set; }
|
|
|
|
/// <summary>
|
|
/// Whether the user has verified their email
|
|
/// </summary>
|
|
public bool EmailConfirmed { get; set; }
|
|
|
|
/// <summary>
|
|
/// whether the user needed to verify their email on account creation
|
|
/// </summary>
|
|
public bool RequiresEmailConfirmation { get; set; }
|
|
|
|
/// <summary>
|
|
/// Whether the user was approved by an admin
|
|
/// </summary>
|
|
public bool Approved { get; set; }
|
|
|
|
/// <summary>
|
|
/// whether the user needed approval on account creation
|
|
/// </summary>
|
|
public bool RequiresApproval { get; set; }
|
|
|
|
/// <summary>
|
|
/// the roles of the user
|
|
/// </summary>
|
|
public string[] Roles { get; set; }
|
|
|
|
/// <summary>
|
|
/// the date the user was created. Null if created before v1.0.5.6.
|
|
/// </summary>
|
|
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
|
|
public DateTimeOffset? Created { get; set; }
|
|
|
|
public bool Disabled { get; set; }
|
|
}
|
|
}
|