@using BTCPayServer.Client @model BTCPayServer.Controllers.UIManageController.AuthorizeApiKeysViewModel @{ var displayName = Model.ApplicationName ?? Model.ApplicationIdentifier; var store = string.IsNullOrEmpty(Model.StoreId) ? null : Model.Stores.FirstOrDefault(s => s.Id == Model.StoreId); var permissions = Model.Permissions?.Split(';') ?? Array.Empty(); var groupedPermissions = Permission.ToPermissions(permissions).GroupBy(permission => permission.Policy); ViewData["Title"] = $"Authorize {displayName ?? "Application"}"; Layout = "_LayoutWizard"; } @section Navbar { @if (Model.NeedsStorePermission && store != null) {
}
}

@ViewData["Title"]

@(displayName ?? "An application") is requesting access to your BTCPay Server account.

@if (Model.NeedsStorePermission && store == null) { @if (!Model.Stores.Any()) {
You currently have no stores configured.
} else {
} } else { @if (Model.RedirectUrl != null) {

If authorized, the generated API key will be provided to @Model.RedirectUrl.AbsoluteUri

}

Permissions

@if (!groupedPermissions.Any()) {

There are no associated permissions to the API key being requested by the application. The application cannot do anything with your BTCPay Server account other than validating your account exists.

} else { if (Model.NeedsStorePermission) {

Store-based permissions will be applied for @store.StoreName

}
@for (var i = 0; i < Model.PermissionValues.Count; i++) { @if (Model.PermissionValues[i].Forbidden && !Model.Strict) { continue; }
@if (Model.Strict || Model.PermissionValues[i].Forbidden) { } else { } @* Wrapper div prevents the label to be muted in case of disabled checkbox (strict mode) *@
@Model.PermissionValues[i].Description
@if (Model.PermissionValues[i].Forbidden) {
This permission is not available for your account.
}
}
}
}