@using BTCPayServer.Components @using BTCPayServer.Views.Server @using BTCPayServer.Views.Stores @using Microsoft.AspNetCore.Mvc.TagHelpers @using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Client @model BTCPayServer.Models.ServerViewModels.RolesViewModel @{ Layout = "_NavLayout.cshtml"; var storeId = Context.GetRouteValue("storeId") as string; var controller = ViewContext.RouteData.Values["controller"].ToString().TrimEnd("Controller", StringComparison.InvariantCultureIgnoreCase); if (storeId is null) ViewData.SetActivePage(ServerNavPages.Roles); else { ViewData.SetActivePage(StoreNavPages.Roles); } var nextRoleSortOrder = (string) ViewData["NextRoleSortOrder"]; String roleSortOrder = null; switch (nextRoleSortOrder) { case "asc": roleSortOrder = "desc"; break; case "desc": roleSortOrder = "asc"; break; } var sortIconClass = "fa-sort"; if (roleSortOrder != null) { sortIconClass = $"fa-sort-alpha-{roleSortOrder}"; } var sortByDesc = "Sort by descending..."; var sortByAsc = "Sort by ascending..."; var showInUseColumn = !Model.Roles.Any(r => r.IsUsed is null); }

@ViewData["Title"]

Add Role
@if (showInUseColumn) { } @foreach (var role in Model.Roles) { @if (showInUseColumn) { } }
Role PermissionsIn useActions
@role.Role @if (role.IsServerRole) { Server-wide @if (Model.DefaultRole == role.Id) { Default } }
@if (!role.Permissions.Any()) { No policies } else { @foreach (var policy in role.Permissions) { @policy } } @if (role.IsUsed is true) { } else { } Edit - Remove @if (role.IsServerRole && Model.DefaultRole != role.Id) { - Set as default }