Set all admin controllers as requiring authorization.

This commit is contained in:
2019-05-18 03:02:49 +01:00
parent 3706035509
commit 531d23599b
14 changed files with 37 additions and 40 deletions

View File

@@ -38,6 +38,7 @@ using Microsoft.EntityFrameworkCore;
namespace cicm_web.Areas.Admin.Controllers
{
[Area("Admin")]
[Authorize]
public class BrowserTestsController : Controller
{
readonly cicmContext _context;
@@ -48,10 +49,7 @@ namespace cicm_web.Areas.Admin.Controllers
}
// GET: Admin/BrowserTests
public async Task<IActionResult> Index()
{
return View(await _context.BrowserTests.ToListAsync());
}
public async Task<IActionResult> Index() => View(await _context.BrowserTests.ToListAsync());
// GET: Admin/BrowserTests/Details/5
public async Task<IActionResult> Details(int? id)
@@ -65,10 +63,7 @@ namespace cicm_web.Areas.Admin.Controllers
}
// GET: Admin/BrowserTests/Create
public IActionResult Create()
{
return View();
}
public IActionResult Create() => View();
// POST: Admin/BrowserTests/Create
// To protect from overposting attacks, please enable the specific properties you want to bind to, for