btcpayserver/BTCPayServer/Views/UIManage/ConfirmAPIKey.cshtml
d11n e43b4ed540
Onboarding: Invite new users (#5714)
* 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
2024-02-28 20:43:18 +09:00

35 lines
1.6 KiB
Text

@model BTCPayServer.Controllers.UIManageController.AuthorizeApiKeysViewModel
@{
var displayName = Model.ApplicationName ?? Model.ApplicationIdentifier;
ViewData["Title"] = $"Authorize {displayName ?? "Application"}";
Layout = "_LayoutWizard";
}
@section PageFootContent {
<script>
delegate('click', '#back', () => { history.back() });
</script>
}
<form method="post" asp-controller="UIManage" asp-action="AuthorizeAPIKey">
<input type="hidden" asp-for="ApplicationName" value="@Model.ApplicationName"/>
<input type="hidden" asp-for="ApplicationIdentifier" value="@Model.ApplicationIdentifier"/>
<input type="hidden" asp-for="ApiKey" value="@Model.ApiKey"/>
<input type="hidden" asp-for="Strict" value="@Model.Strict"/>
<input type="hidden" asp-for="RedirectUrl" value="@Model.RedirectUrl"/>
<input type="hidden" asp-for="Permissions" value="@Model.Permissions"/>
<input type="hidden" asp-for="SelectiveStores" value="@Model.SelectiveStores"/>
<header class="text-center">
<h1>@ViewData["Title"]</h1>
<p class="lead text-secondary mt-3">Are you sure about exposing your API Key to @displayName?</p>
</header>
<p>
You've previously generated the API Key <code>@Model.ApiKey</code> specifically for
<strong>@displayName</strong> with the URL <code>@Model.RedirectUrl</code>.
</p>
<div class="d-flex gap-3">
<button class="btn btn-primary" name="command" id="continue" type="submit" value="Confirm">Authorize app</button>
<button class="btn btn-secondary" name="command" id="back" type="button">Cancel</button>
</div>
</form>