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:
@@ -38,6 +38,7 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
namespace cicm_web.Areas.Admin.Controllers
|
namespace cicm_web.Areas.Admin.Controllers
|
||||||
{
|
{
|
||||||
[Area("Admin")]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public class BrowserTestsController : Controller
|
public class BrowserTestsController : Controller
|
||||||
{
|
{
|
||||||
readonly cicmContext _context;
|
readonly cicmContext _context;
|
||||||
@@ -48,10 +49,7 @@ namespace cicm_web.Areas.Admin.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GET: Admin/BrowserTests
|
// GET: Admin/BrowserTests
|
||||||
public async Task<IActionResult> Index()
|
public async Task<IActionResult> Index() => View(await _context.BrowserTests.ToListAsync());
|
||||||
{
|
|
||||||
return View(await _context.BrowserTests.ToListAsync());
|
|
||||||
}
|
|
||||||
|
|
||||||
// GET: Admin/BrowserTests/Details/5
|
// GET: Admin/BrowserTests/Details/5
|
||||||
public async Task<IActionResult> Details(int? id)
|
public async Task<IActionResult> Details(int? id)
|
||||||
@@ -65,10 +63,7 @@ namespace cicm_web.Areas.Admin.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GET: Admin/BrowserTests/Create
|
// GET: Admin/BrowserTests/Create
|
||||||
public IActionResult Create()
|
public IActionResult Create() => View();
|
||||||
{
|
|
||||||
return View();
|
|
||||||
}
|
|
||||||
|
|
||||||
// POST: Admin/BrowserTests/Create
|
// POST: Admin/BrowserTests/Create
|
||||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Cicm.Database.Models;
|
using Cicm.Database.Models;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
@@ -39,6 +40,7 @@ using Microsoft.EntityFrameworkCore.Query;
|
|||||||
namespace cicm_web.Areas.Admin.Controllers
|
namespace cicm_web.Areas.Admin.Controllers
|
||||||
{
|
{
|
||||||
[Area("Admin")]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public class CompanyDescriptionsController : Controller
|
public class CompanyDescriptionsController : Controller
|
||||||
{
|
{
|
||||||
readonly cicmContext _context;
|
readonly cicmContext _context;
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Cicm.Database.Models;
|
using Cicm.Database.Models;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
@@ -39,6 +40,7 @@ using Microsoft.EntityFrameworkCore.Query;
|
|||||||
namespace cicm_web.Areas.Admin.Controllers
|
namespace cicm_web.Areas.Admin.Controllers
|
||||||
{
|
{
|
||||||
[Area("Admin")]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public class GpusController : Controller
|
public class GpusController : Controller
|
||||||
{
|
{
|
||||||
readonly cicmContext _context;
|
readonly cicmContext _context;
|
||||||
|
|||||||
@@ -31,12 +31,14 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Cicm.Database.Models;
|
using Cicm.Database.Models;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
namespace cicm_web.Areas.Admin.Controllers
|
namespace cicm_web.Areas.Admin.Controllers
|
||||||
{
|
{
|
||||||
[Area("Admin")]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public class InstructionSetExtensionsController : Controller
|
public class InstructionSetExtensionsController : Controller
|
||||||
{
|
{
|
||||||
readonly cicmContext _context;
|
readonly cicmContext _context;
|
||||||
@@ -47,10 +49,7 @@ namespace cicm_web.Areas.Admin.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GET: Admin/InstructionSetExtensions
|
// GET: Admin/InstructionSetExtensions
|
||||||
public async Task<IActionResult> Index()
|
public async Task<IActionResult> Index() => View(await _context.InstructionSetExtensions.ToListAsync());
|
||||||
{
|
|
||||||
return View(await _context.InstructionSetExtensions.ToListAsync());
|
|
||||||
}
|
|
||||||
|
|
||||||
// GET: Admin/InstructionSetExtensions/Details/5
|
// GET: Admin/InstructionSetExtensions/Details/5
|
||||||
public async Task<IActionResult> Details(int? id)
|
public async Task<IActionResult> Details(int? id)
|
||||||
@@ -65,10 +64,7 @@ namespace cicm_web.Areas.Admin.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GET: Admin/InstructionSetExtensions/Create
|
// GET: Admin/InstructionSetExtensions/Create
|
||||||
public IActionResult Create()
|
public IActionResult Create() => View();
|
||||||
{
|
|
||||||
return View();
|
|
||||||
}
|
|
||||||
|
|
||||||
// POST: Admin/InstructionSetExtensions/Create
|
// POST: Admin/InstructionSetExtensions/Create
|
||||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||||
|
|||||||
@@ -31,12 +31,14 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Cicm.Database.Models;
|
using Cicm.Database.Models;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
namespace cicm_web.Areas.Admin.Controllers
|
namespace cicm_web.Areas.Admin.Controllers
|
||||||
{
|
{
|
||||||
[Area("Admin")]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public class InstructionSetsController : Controller
|
public class InstructionSetsController : Controller
|
||||||
{
|
{
|
||||||
readonly cicmContext _context;
|
readonly cicmContext _context;
|
||||||
@@ -47,10 +49,7 @@ namespace cicm_web.Areas.Admin.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GET: Admin/InstructionSets
|
// GET: Admin/InstructionSets
|
||||||
public async Task<IActionResult> Index()
|
public async Task<IActionResult> Index() => View(await _context.InstructionSets.ToListAsync());
|
||||||
{
|
|
||||||
return View(await _context.InstructionSets.ToListAsync());
|
|
||||||
}
|
|
||||||
|
|
||||||
// GET: Admin/InstructionSets/Details/5
|
// GET: Admin/InstructionSets/Details/5
|
||||||
public async Task<IActionResult> Details(int? id)
|
public async Task<IActionResult> Details(int? id)
|
||||||
@@ -64,10 +63,7 @@ namespace cicm_web.Areas.Admin.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GET: Admin/InstructionSets/Create
|
// GET: Admin/InstructionSets/Create
|
||||||
public IActionResult Create()
|
public IActionResult Create() => View();
|
||||||
{
|
|
||||||
return View();
|
|
||||||
}
|
|
||||||
|
|
||||||
// POST: Admin/InstructionSets/Create
|
// POST: Admin/InstructionSets/Create
|
||||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Cicm.Database.Models;
|
using Cicm.Database.Models;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
@@ -39,6 +40,7 @@ using Microsoft.EntityFrameworkCore.Query;
|
|||||||
namespace cicm_web.Areas.Admin.Controllers
|
namespace cicm_web.Areas.Admin.Controllers
|
||||||
{
|
{
|
||||||
[Area("Admin")]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public class MachineFamiliesController : Controller
|
public class MachineFamiliesController : Controller
|
||||||
{
|
{
|
||||||
readonly cicmContext _context;
|
readonly cicmContext _context;
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Cicm.Database.Models;
|
using Cicm.Database.Models;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
@@ -39,6 +40,7 @@ using Microsoft.EntityFrameworkCore.Query;
|
|||||||
namespace cicm_web.Areas.Admin.Controllers
|
namespace cicm_web.Areas.Admin.Controllers
|
||||||
{
|
{
|
||||||
[Area("Admin")]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public class MachinesController : Controller
|
public class MachinesController : Controller
|
||||||
{
|
{
|
||||||
readonly cicmContext _context;
|
readonly cicmContext _context;
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Cicm.Database.Models;
|
using Cicm.Database.Models;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
@@ -39,6 +40,7 @@ using Microsoft.EntityFrameworkCore.Query;
|
|||||||
namespace cicm_web.Areas.Admin.Controllers
|
namespace cicm_web.Areas.Admin.Controllers
|
||||||
{
|
{
|
||||||
[Area("Admin")]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public class MemoryByMachinesController : Controller
|
public class MemoryByMachinesController : Controller
|
||||||
{
|
{
|
||||||
readonly cicmContext _context;
|
readonly cicmContext _context;
|
||||||
|
|||||||
@@ -31,12 +31,14 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Cicm.Database.Models;
|
using Cicm.Database.Models;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
namespace cicm_web.Areas.Admin.Controllers
|
namespace cicm_web.Areas.Admin.Controllers
|
||||||
{
|
{
|
||||||
[Area("Admin")]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public class NewsController : Controller
|
public class NewsController : Controller
|
||||||
{
|
{
|
||||||
readonly cicmContext _context;
|
readonly cicmContext _context;
|
||||||
@@ -47,10 +49,7 @@ namespace cicm_web.Areas.Admin.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GET: Admin/News
|
// GET: Admin/News
|
||||||
public async Task<IActionResult> Index()
|
public async Task<IActionResult> Index() => View(await _context.News.ToListAsync());
|
||||||
{
|
|
||||||
return View(await _context.News.ToListAsync());
|
|
||||||
}
|
|
||||||
|
|
||||||
// GET: Admin/News/Details/5
|
// GET: Admin/News/Details/5
|
||||||
public async Task<IActionResult> Details(int? id)
|
public async Task<IActionResult> Details(int? id)
|
||||||
@@ -64,10 +63,7 @@ namespace cicm_web.Areas.Admin.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GET: Admin/News/Create
|
// GET: Admin/News/Create
|
||||||
public IActionResult Create()
|
public IActionResult Create() => View();
|
||||||
{
|
|
||||||
return View();
|
|
||||||
}
|
|
||||||
|
|
||||||
// POST: Admin/News/Create
|
// POST: Admin/News/Create
|
||||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Cicm.Database.Models;
|
using Cicm.Database.Models;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
@@ -39,6 +40,7 @@ using Microsoft.EntityFrameworkCore.Query;
|
|||||||
namespace cicm_web.Areas.Admin.Controllers
|
namespace cicm_web.Areas.Admin.Controllers
|
||||||
{
|
{
|
||||||
[Area("Admin")]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public class ProcessorsByMachinesController : Controller
|
public class ProcessorsByMachinesController : Controller
|
||||||
{
|
{
|
||||||
readonly cicmContext _context;
|
readonly cicmContext _context;
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Cicm.Database.Models;
|
using Cicm.Database.Models;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
@@ -39,6 +40,7 @@ using Microsoft.EntityFrameworkCore.Query;
|
|||||||
namespace cicm_web.Areas.Admin.Controllers
|
namespace cicm_web.Areas.Admin.Controllers
|
||||||
{
|
{
|
||||||
[Area("Admin")]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public class ProcessorsController : Controller
|
public class ProcessorsController : Controller
|
||||||
{
|
{
|
||||||
readonly cicmContext _context;
|
readonly cicmContext _context;
|
||||||
|
|||||||
@@ -31,12 +31,14 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Cicm.Database.Models;
|
using Cicm.Database.Models;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
namespace cicm_web.Areas.Admin.Controllers
|
namespace cicm_web.Areas.Admin.Controllers
|
||||||
{
|
{
|
||||||
[Area("Admin")]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public class ResolutionsController : Controller
|
public class ResolutionsController : Controller
|
||||||
{
|
{
|
||||||
readonly cicmContext _context;
|
readonly cicmContext _context;
|
||||||
@@ -47,10 +49,7 @@ namespace cicm_web.Areas.Admin.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GET: Admin/Resolutions
|
// GET: Admin/Resolutions
|
||||||
public async Task<IActionResult> Index()
|
public async Task<IActionResult> Index() => View(await _context.Resolutions.ToListAsync());
|
||||||
{
|
|
||||||
return View(await _context.Resolutions.ToListAsync());
|
|
||||||
}
|
|
||||||
|
|
||||||
// GET: Admin/Resolutions/Details/5
|
// GET: Admin/Resolutions/Details/5
|
||||||
public async Task<IActionResult> Details(int? id)
|
public async Task<IActionResult> Details(int? id)
|
||||||
@@ -64,10 +63,7 @@ namespace cicm_web.Areas.Admin.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GET: Admin/Resolutions/Create
|
// GET: Admin/Resolutions/Create
|
||||||
public IActionResult Create()
|
public IActionResult Create() => View();
|
||||||
{
|
|
||||||
return View();
|
|
||||||
}
|
|
||||||
|
|
||||||
// POST: Admin/Resolutions/Create
|
// POST: Admin/Resolutions/Create
|
||||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Cicm.Database.Models;
|
using Cicm.Database.Models;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
@@ -39,6 +40,7 @@ using Microsoft.EntityFrameworkCore.Query;
|
|||||||
namespace cicm_web.Areas.Admin.Controllers
|
namespace cicm_web.Areas.Admin.Controllers
|
||||||
{
|
{
|
||||||
[Area("Admin")]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public class SoundSynthsController : Controller
|
public class SoundSynthsController : Controller
|
||||||
{
|
{
|
||||||
readonly cicmContext _context;
|
readonly cicmContext _context;
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Cicm.Database.Models;
|
using Cicm.Database.Models;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
@@ -39,6 +40,7 @@ using Microsoft.EntityFrameworkCore.Query;
|
|||||||
namespace cicm_web.Areas.Admin.Controllers
|
namespace cicm_web.Areas.Admin.Controllers
|
||||||
{
|
{
|
||||||
[Area("Admin")]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public class StorageByMachinesController : Controller
|
public class StorageByMachinesController : Controller
|
||||||
{
|
{
|
||||||
readonly cicmContext _context;
|
readonly cicmContext _context;
|
||||||
|
|||||||
Reference in New Issue
Block a user