Fixed missing authorization for /Home endpoints

This commit is contained in:
2025-10-13 15:58:46 +02:00
parent 44c1228ff0
commit 903c1836eb

View File

@@ -27,6 +27,7 @@ public class HomeController : Controller
return View(); return View();
} }
[Authorize]
[HttpGet("Assets")] [HttpGet("Assets")]
public async Task<IActionResult> Assets() public async Task<IActionResult> Assets()
{ {
@@ -47,12 +48,14 @@ public class HomeController : Controller
return View(new HomeIndexViewModel() { AssetsTableViewModels = assetsTableViewModels }); return View(new HomeIndexViewModel() { AssetsTableViewModels = assetsTableViewModels });
} }
[Authorize]
[HttpGet("Inventory")] [HttpGet("Inventory")]
public ActionResult Inventory() public ActionResult Inventory()
{ {
return View(); return View();
} }
[Authorize]
[HttpGet("Locations")] [HttpGet("Locations")]
public async Task<ActionResult> LocationsAsync() public async Task<ActionResult> LocationsAsync()
{ {
@@ -71,6 +74,7 @@ public class HomeController : Controller
return View(new LocationsIndexViewModel() { LocationTableViewModels = LocationsTableViewModels }); return View(new LocationsIndexViewModel() { LocationTableViewModels = LocationsTableViewModels });
} }
[Authorize]
[HttpGet("Users")] [HttpGet("Users")]
public async Task<ActionResult> UsersAsync() public async Task<ActionResult> UsersAsync()
{ {
@@ -91,6 +95,7 @@ public class HomeController : Controller
return View(new UsersIndexViewModel() { UserTableViewModels = UserTableViewModels }); return View(new UsersIndexViewModel() { UserTableViewModels = UserTableViewModels });
} }
[Authorize]
[HttpGet("Groups")] [HttpGet("Groups")]
public async Task<ActionResult> GroupsAsync() public async Task<ActionResult> GroupsAsync()
{ {