-
Notifications
You must be signed in to change notification settings - Fork 159
/
_Layout.cshtml
105 lines (104 loc) · 6.33 KB
/
_Layout.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
@using Example4.MvcWebApp.IndividualAccounts.PermissionsCode
@using AuthPermissions.BaseCode.PermissionsCode
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - Example4.MvcWebApp.IndividualAccounts</title>
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/css/site.css" />
<link rel="stylesheet" href="~/lib/bootstrap-multiselect/css/bootstrap-multiselect.css"/>
</head>
<body>
<header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
<div class="container">
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Example4</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
<ul class="navbar-nav flex-grow-1">
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
</li>
@if (User.HasPermission(Example4Permissions.StockRead))
{
<li class="nav-item">
<div class="dropdown">
<a class="nav-link text-dark dropdown-toggle" role="button" id="dropdown1MenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Shop
</a>
<div class="dropdown-menu" aria-labelledby="dropdown1MenuButton">
@if (User.HasPermission(Example4Permissions.SalesSell))
{
<a class="nav-link text-dark" asp-area="" asp-controller="Shop" asp-action="Till">Till</a>
}
<a class="nav-link text-dark" asp-area="" asp-controller="Shop" asp-action="Stock">Stock</a>
@if (User.HasPermission(Example4Permissions.SalesRead))
{
<a class="nav-link text-dark" asp-area="" asp-controller="Shop" asp-action="Sales">Sales</a>
}
</div>
</div>
</li>
}
<li class="dropdown nav-link text-dark">
<a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
Auth Admin
</a>
<div class="dropdown-menu">
<a class="dropdown-item" asp-area="" asp-controller="AuthUsers" asp-action="Index">List all AuthUsers</a>
<a class="dropdown-item" asp-area="" asp-controller="Roles" asp-action="Index">List Roles</a>
@if (User.HasPermission(Example4Permissions.TenantList))
{
<a class="dropdown-item" asp-area="" asp-controller="Tenant" asp-action="Index">List Tenants</a>
}
@if (User.HasPermission(Example4Permissions.PermissionRead))
{
<a class="dropdown-item" asp-area="" asp-controller="Roles" asp-action="ListPermissions">List all Permissions</a>
}
@if (User.HasPermission(Example4Permissions.AppStatusList))
{
<a class="dropdown-item" asp-area="" asp-controller="Status" asp-action="Index">List app statues</a>
}
</div>
</li>
<li class="dropdown nav-link text-dark">
<a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
Users info
</a>
<div class="dropdown-menu">
<a class="dropdown-item" asp-area="" asp-controller="LoggedInUser" asp-action="Index">Your claims</a>
<a class="dropdown-item" asp-area="" asp-controller="LoggedInUser" asp-action="AuthUserInfo">Your auth data</a>
<a class="dropdown-item" asp-area="" asp-controller="LoggedInUser" asp-action="UserPermissions">Your Permissions</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
</li>
</ul>
<partial name="_LoginPartial" />
</div>
</div>
</nav>
</header>
<div class="container">
<main role="main" class="pb-3">
@RenderBody()
</main>
</div>
<footer class="border-top footer text-muted">
<div class="container">
© 2021 - Example4.MvcWebApp.IndividualAccounts - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
</div>
</footer>
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="~/lib/bootstrap-multiselect/js/bootstrap-multiselect.js"></script>
<script src="~/js/site.js" asp-append-version="true"></script>
@await RenderSectionAsync("Scripts", required: false)
</body>
</html>