mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Set all admin controllers as requiring authorization.
This commit is contained in:
@@ -31,12 +31,14 @@
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Cicm.Database.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace cicm_web.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public class InstructionSetsController : Controller
|
||||
{
|
||||
readonly cicmContext _context;
|
||||
@@ -47,10 +49,7 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// GET: Admin/InstructionSets
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
return View(await _context.InstructionSets.ToListAsync());
|
||||
}
|
||||
public async Task<IActionResult> Index() => View(await _context.InstructionSets.ToListAsync());
|
||||
|
||||
// GET: Admin/InstructionSets/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
@@ -64,10 +63,7 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// GET: Admin/InstructionSets/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/InstructionSets/Create
|
||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||
|
||||
Reference in New Issue
Block a user