Force admin authorization for server index and edit pages

Fixes #39
net8.0
Pat Hartl 2023-11-20 18:23:37 -06:00
parent 70674f900e
commit 8b3f2c6cde
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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