diff --git a/CouchLog/Components/AdminSettings/Pages/Index.razor b/CouchLog/Components/AdminSettings/Pages/Index.razor index e506207..bc6dce5 100644 --- a/CouchLog/Components/AdminSettings/Pages/Index.razor +++ b/CouchLog/Components/AdminSettings/Pages/Index.razor @@ -1,5 +1,9 @@ @page "/AdminSettings" +@using Microsoft.AspNetCore.Authorization + +@attribute [Authorize(Roles = "Admin")] +

Index

@code { diff --git a/CouchLog/Components/AdminSettings/Pages/UserManagement.razor b/CouchLog/Components/AdminSettings/Pages/UserManagement.razor index 18fa06d..9e72063 100644 --- a/CouchLog/Components/AdminSettings/Pages/UserManagement.razor +++ b/CouchLog/Components/AdminSettings/Pages/UserManagement.razor @@ -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 UserManager @@ -12,6 +13,8 @@ @inject AuthenticationStateProvider AuthenticationStateProvider @inject NavigationManager NavigationManager +@attribute [Authorize(Roles = "Admin")] +

UserManagement

diff --git a/CouchLog/Components/AdminSettings/Shared/AdminSettingsLayout.razor b/CouchLog/Components/AdminSettings/Shared/AdminSettingsLayout.razor index 339c95f..f13c34a 100644 --- a/CouchLog/Components/AdminSettings/Shared/AdminSettingsLayout.razor +++ b/CouchLog/Components/AdminSettings/Shared/AdminSettingsLayout.razor @@ -1,6 +1,10 @@ -@inherits LayoutComponentBase +@using Microsoft.AspNetCore.Authorization + +@inherits LayoutComponentBase @layout CouchLog.Components.Layout.MainLayout +@attribute [Authorize(Roles = "Admin")] +

Manage CouchLog