mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-25 07:07:31 +01:00
* Server Users: More precise message when inviting users This lets the admin who invited a new user know whether or not an email has been sent. If the SMTP server hasn't been set up, they need to share the invite link with the user. * Onboarding: Invite new users - Separates the user self-registration and invite cases - Adds invitation email for users created by the admin - Adds invitation tokens to verify user was invited - Adds handler action for invite links - Refactors `UserEventHostedService` * Remove duplicate status message from views that use the wizard layout * Auto-approve users created by an admin * Notify admins via email if a new account requires approval * Update wording * Fix update user error * Fix redirect to email confirmation in invite action * Fix precondition checks after signup * Improve admin notification Send notification only if the user does not require email confirmation or when they confirmed their email address. Rationale: We want to inform admins only about qualified users and not annoy them with bot registrations. * Allow approval alongside resending confirm email * Use user email in log messages instead of ID * Prevent unnecessary notification after email confirmation * Use ApplicationUser type explicitly * Fix after rebase * Refactoring: Do not subclass UserRegisteredEvent
39 lines
1.7 KiB
Text
39 lines
1.7 KiB
Text
@model BTCPayServer.Models.AccountViewModels.SetPasswordViewModel
|
|
@{
|
|
ViewData["Title"] = $"{(Model.HasPassword ? "Reset" : "Set")} your password";
|
|
Layout = "_LayoutSignedOut";
|
|
}
|
|
|
|
<form method="post" asp-action="SetPassword">
|
|
<div asp-validation-summary="All" class="@(ViewContext.ModelState.ErrorCount.Equals(1) ? "no-marker" : "")"></div>
|
|
<input asp-for="Code" type="hidden"/>
|
|
<input asp-for="EmailSetInternally" type="hidden"/>
|
|
@if (Model.EmailSetInternally)
|
|
{
|
|
<input asp-for="Email" type="hidden"/>
|
|
<div class="form-group">
|
|
<label asp-for="Email" class="form-label"></label>
|
|
<input type="text" disabled value="@Model.Email" class="form-control"/>
|
|
<span asp-validation-for="Email" class="text-danger"></span>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="form-group">
|
|
<label asp-for="Email" class="form-label"></label>
|
|
<input asp-for="Email" value="@Model.Email" class="form-control"/>
|
|
<span asp-validation-for="Email" class="text-danger"></span>
|
|
</div>
|
|
}
|
|
<div class="form-group">
|
|
<label asp-for="Password" class="form-label"></label>
|
|
<input asp-for="Password" class="form-control"/>
|
|
<span asp-validation-for="Password" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="ConfirmPassword" class="form-label"></label>
|
|
<input asp-for="ConfirmPassword" class="form-control"/>
|
|
<span asp-validation-for="ConfirmPassword" class="text-danger"></span>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary w-100 btn-lg" id="SetPassword">Set Password</button>
|
|
</form>
|