mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 14:22:40 +01:00
* 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>
18 lines
585 B
Text
18 lines
585 B
Text
@model DateTimeOffset?
|
|
@{
|
|
ViewData["Title"] = "Account disabled";
|
|
Layout = "_LayoutSignedOut";
|
|
}
|
|
|
|
@if (Model is null)
|
|
{
|
|
<p class="mb-0">This account has been locked out because of multiple invalid login attempts. Please try again later.</p>
|
|
}
|
|
else if (DateTimeOffset.MaxValue - Model.Value < TimeSpan.FromSeconds(1))
|
|
{
|
|
<p class="mb-0">Your account has been disabled. Please contact server administrator.</p>
|
|
}
|
|
else
|
|
{
|
|
<p class="mb-0">This account has been locked out. Please try again @Model.Value.ToBrowserDate(ViewsRazor.DateDisplayFormat.Relative).</p>
|
|
}
|