From 8b3f2c6cdeb88a3365d0dbae11b2dc6953014f54 Mon Sep 17 00:00:00 2001 From: Pat Hartl Date: Mon, 20 Nov 2023 18:23:37 -0600 Subject: [PATCH] Force admin authorization for server index and edit pages Fixes #39 --- LANCommander/Pages/Servers/Edit.razor | 1 + LANCommander/Pages/Servers/Index.razor | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/LANCommander/Pages/Servers/Edit.razor b/LANCommander/Pages/Servers/Edit.razor index 2a8cbdf..35c8b23 100644 --- a/LANCommander/Pages/Servers/Edit.razor +++ b/LANCommander/Pages/Servers/Edit.razor @@ -2,6 +2,7 @@ @page "/Servers/{id:guid}/{panel}" @page "/Servers/{id:guid}/{panel}/{logId}" @page "/Servers/Add" +@attribute [Authorize(Roles = "Administrator")] @using LANCommander.Components.FileManagerComponents; @using LANCommander.Pages.Servers.Components @inject GameService GameService diff --git a/LANCommander/Pages/Servers/Index.razor b/LANCommander/Pages/Servers/Index.razor index dd0d3f9..f9757d6 100644 --- a/LANCommander/Pages/Servers/Index.razor +++ b/LANCommander/Pages/Servers/Index.razor @@ -1,7 +1,7 @@ @page "/Servers" @using LANCommander.Pages.Servers.Components @using Microsoft.EntityFrameworkCore; -@attribute [Authorize] +@attribute [Authorize(Roles = "Administrator")] @inject ServerService ServerService @inject ServerProcessService ServerProcessService @inject NavigationManager NavigationManager