Require authorization for most controllers
parent
d65ef4a280
commit
2fc43f3f34
|
@ -7,9 +7,11 @@ using Microsoft.AspNetCore.Mvc.Rendering;
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using LANCommander.Data;
|
||||
using LANCommander.Data.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
||||
namespace LANCommander.Controllers
|
||||
{
|
||||
[Authorize]
|
||||
public class CompaniesController : Controller
|
||||
{
|
||||
private readonly DatabaseContext _context;
|
||||
|
|
|
@ -7,9 +7,11 @@ using Microsoft.AspNetCore.Mvc.Rendering;
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using LANCommander.Data;
|
||||
using LANCommander.Data.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
||||
namespace LANCommander.Controllers
|
||||
{
|
||||
[Authorize]
|
||||
public class GamesController : Controller
|
||||
{
|
||||
private readonly DatabaseContext Context;
|
||||
|
@ -156,7 +158,7 @@ namespace LANCommander.Controllers
|
|||
{
|
||||
if (Context.Games == null)
|
||||
{
|
||||
return Problem("Entity set 'DatabaseContext.Games' is null.");
|
||||
return Problem("Entity set 'DatabaseContext.Games' is null.");
|
||||
}
|
||||
var game = await Context.Games.FindAsync(id);
|
||||
if (game != null)
|
||||
|
|
|
@ -7,9 +7,11 @@ using Microsoft.AspNetCore.Mvc.Rendering;
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using LANCommander.Data;
|
||||
using LANCommander.Data.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
||||
namespace LANCommander.Controllers
|
||||
{
|
||||
[Authorize]
|
||||
public class TagsController : Controller
|
||||
{
|
||||
private readonly DatabaseContext _context;
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
using LANCommander.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace LANCommander.Controllers
|
||||
{
|
||||
[Authorize]
|
||||
public class UploadController : Controller
|
||||
{
|
||||
private const string UploadDirectory = "Upload";
|
||||
|
|
Loading…
Reference in New Issue