Merge pull request 'fix: fixed access to AdminSettings without being authorize' (#12) from FixAdminSettingsAuthorize into main
All checks were successful
Build Docker Linux ARM64 Release / build-docker-linux-arm64-release (push) Successful in 6m35s
All checks were successful
Build Docker Linux ARM64 Release / build-docker-linux-arm64-release (push) Successful in 6m35s
Reviewed-on: #12
This commit was merged in pull request #12.
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
@page "/AdminSettings"
|
@page "/AdminSettings"
|
||||||
|
|
||||||
|
@using Microsoft.AspNetCore.Authorization
|
||||||
|
|
||||||
|
@attribute [Authorize(Roles = "Admin")]
|
||||||
|
|
||||||
<h3>Index</h3>
|
<h3>Index</h3>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
@using Microsoft.AspNetCore.Identity
|
@using Microsoft.AspNetCore.Identity
|
||||||
@using Microsoft.EntityFrameworkCore
|
@using Microsoft.EntityFrameworkCore
|
||||||
@using Microsoft.AspNetCore.Components.QuickGrid
|
@using Microsoft.AspNetCore.Components.QuickGrid
|
||||||
|
@using Microsoft.AspNetCore.Authorization
|
||||||
|
|
||||||
@inject ApplicationDbContext CouchLogDB
|
@inject ApplicationDbContext CouchLogDB
|
||||||
@inject UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@@ -12,6 +13,8 @@
|
|||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
|
|
||||||
|
@attribute [Authorize(Roles = "Admin")]
|
||||||
|
|
||||||
<div class="d-flex align-items-center justify-content-between">
|
<div class="d-flex align-items-center justify-content-between">
|
||||||
<h3 class="mb-0">UserManagement</h3>
|
<h3 class="mb-0">UserManagement</h3>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
@inherits LayoutComponentBase
|
@using Microsoft.AspNetCore.Authorization
|
||||||
|
|
||||||
|
@inherits LayoutComponentBase
|
||||||
@layout CouchLog.Components.Layout.MainLayout
|
@layout CouchLog.Components.Layout.MainLayout
|
||||||
|
|
||||||
|
@attribute [Authorize(Roles = "Admin")]
|
||||||
|
|
||||||
<h1>Manage CouchLog</h1>
|
<h1>Manage CouchLog</h1>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in New Issue
Block a user