< Summary

Information
Class: AspNetCoreGeneratedDocument.Areas_Identity_Pages_Account_AccessDenied
Assembly: OzonOrdersWeb
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/Areas/Identity/Pages/Account/AccessDenied.cshtml
Line coverage
0%
Covered lines: 0
Uncovered lines: 8
Coverable lines: 8
Total lines: 155
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 24
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
ExecuteAsync()0%2040%
<ExecuteAsync()100%210%
<ExecuteAsync()0%420200%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/Areas/Identity/Pages/Account/AccessDenied.cshtml

#LineLine coverage
 1@page
 2@model AccessDeniedModel
 3@{
 04    ViewData["Title"] = "Доступ запрещён";
 05    Layout = null;
 06    var returnUrl = HttpContext.Request.Query["ReturnUrl"].ToString();
 7}
 8
 9<!DOCTYPE html>
 10<html lang="ru">
 11<head>
 12    <meta charset="utf-8"/>
 13    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
 014    <title>@ViewData["Title"]</title>
 15
 16    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"/>
 17    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css"/>
 18    <style>
 19        body {
 20            display: flex;
 21            min-height: 100vh;
 22            flex-direction: column;
 23            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
 24            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
 25        }
 26        main {
 27            flex: 1;
 28            display: flex;
 29            align-items: center;
 30            justify-content: center;
 31            padding: 20px;
 32        }
 33        .denied-card {
 34            width: 100%;
 35            max-width: 520px;
 36            border: none;
 37            border-radius: 16px;
 38            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
 39            overflow: hidden;
 40        }
 41        .denied-header {
 42            background: linear-gradient(135deg, #dc3545 0%, #8b1a24 100%);
 43            color: #fff;
 44            text-align: center;
 45            padding: 40px 24px 28px;
 46        }
 47        .denied-icon {
 48            width: 72px;
 49            height: 72px;
 50            margin: 0 auto;
 51        }
 52        .denied-icon img {
 53            display: block;
 54            width: 100%;
 55            height: 100%;
 56        }
 57        .denied-header h1 {
 58            margin: 12px 0 0;
 59            font-size: 1.8rem;
 60            font-weight: 600;
 61            letter-spacing: 0.3px;
 62        }
 63        .denied-body {
 64            padding: 28px 32px 32px;
 65            text-align: center;
 66        }
 67        .denied-body p {
 68            color: #495057;
 69            font-size: 1.02rem;
 70            line-height: 1.55;
 71            margin-bottom: 20px;
 72        }
 73        .info-box {
 74            background: #f8f9fa;
 75            border-left: 4px solid #0d6efd;
 76            border-radius: 6px;
 77            padding: 14px 16px;
 78            text-align: left;
 79            font-size: 0.92rem;
 80            color: #495057;
 81            margin-bottom: 22px;
 82        }
 83        .info-box code {
 84            background: #fff;
 85            padding: 2px 6px;
 86            border-radius: 4px;
 87            color: #d63384;
 88            font-size: 0.88rem;
 89            word-break: break-all;
 90        }
 91        .btn-actions {
 92            display: grid;
 93            grid-template-columns: 1fr 1fr;
 94            gap: 10px;
 95        }
 96        @@media (max-width: 480px) {
 97            .btn-actions { grid-template-columns: 1fr; }
 98        }
 99        .user-hint {
 100            margin-top: 18px;
 101            font-size: 0.85rem;
 102            color: #6c757d;
 103        }
 104        .user-hint a { color: #0d6efd; text-decoration: none; }
 105        .user-hint a:hover { text-decoration: underline; }
 106    </style>
 107</head>
 108<body>
 109<main>
 110    <div class="denied-card card">
 111        <div class="denied-header">
 112            <div class="denied-icon"><img src="~/images/status/access-denied.svg" asp-append-version="true" alt=""></div
 113            <h1>Доступ запрещён</h1>
 114        </div>
 115        <div class="denied-body">
 116            <p>
 117                У вашей учётной записи недостаточно прав для просмотра этой страницы.
 118                Если вы считаете, что это ошибка — обратитесь к администратору системы.
 119            </p>
 120
 0121            @if (!string.IsNullOrEmpty(returnUrl))
 122            {
 123                <div class="info-box">
 124                    <strong><i class="bi bi-link-45deg"></i> Запрошенный адрес:</strong><br/>
 0125                    <code>@returnUrl</code>
 126                </div>
 127            }
 128
 129            <div class="btn-actions">
 130                <a href="/" class="btn btn-primary">
 131                    <i class="bi bi-house-door me-1"></i> На главную
 132                </a>
 133                <a href="javascript:history.back()" class="btn btn-outline-secondary">
 134                    <i class="bi bi-arrow-left me-1"></i> Назад
 135                </a>
 136            </div>
 137
 138            <div class="user-hint">
 0139                @if (User?.Identity?.IsAuthenticated == true)
 140                {
 0141                    <span>Вы вошли как <strong>@User.Identity.Name</strong>.</span>
 142                    <a asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="/">Выйти</a>
 143                }
 144                else
 145                {
 146                    <a asp-area="Identity" asp-page="/Account/Login">Войти в систему</a>
 147                }
 148            </div>
 149        </div>
 150    </div>
 151</main>
 152
 153<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
 154</body>
 155</html>