fix: fixed access to AdminSettings without being authorize
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
@page "/AdminSettings"
|
||||
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
|
||||
@attribute [Authorize(Roles = "Admin")]
|
||||
|
||||
<h3>Index</h3>
|
||||
|
||||
@code {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@using Microsoft.AspNetCore.Identity
|
||||
@using Microsoft.EntityFrameworkCore
|
||||
@using Microsoft.AspNetCore.Components.QuickGrid
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
|
||||
@inject ApplicationDbContext CouchLogDB
|
||||
@inject UserManager<ApplicationUser> UserManager
|
||||
@@ -12,6 +13,8 @@
|
||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||
@inject NavigationManager NavigationManager
|
||||
|
||||
@attribute [Authorize(Roles = "Admin")]
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<h3 class="mb-0">UserManagement</h3>
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
@inherits LayoutComponentBase
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
|
||||
@inherits LayoutComponentBase
|
||||
@layout CouchLog.Components.Layout.MainLayout
|
||||
|
||||
@attribute [Authorize(Roles = "Admin")]
|
||||
|
||||
<h1>Manage CouchLog</h1>
|
||||
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user