Skip to content

Commit

Permalink
Require login to view any data.
Browse files Browse the repository at this point in the history
  • Loading branch information
AustinWise committed May 14, 2023
1 parent 18870fb commit 441fdb7
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 25 deletions.
13 changes: 8 additions & 5 deletions src/DkpWeb/Controllers/AnalyseController.cs
@@ -1,13 +1,16 @@
using System.Linq;
using Austin.DkpLib;
using System.IO;
using Microsoft.AspNetCore.Mvc;
using Austin.DkpLib;
using DkpWeb.Data;
using DkpWeb.Models.AnalyzeViewModels;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Data;
using System.IO;
using System.Linq;

namespace DkpWeb.Controllers
{
public class AnalyseController : Controller
[Authorize(Roles = "DKP")]
public class AnalyseController : Controller
{
ApplicationDbContext dc;

Expand Down
11 changes: 4 additions & 7 deletions src/DkpWeb/Controllers/BillSplitController.cs
@@ -1,15 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Austin.DkpLib;
using DkpWeb.Data;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Http;
using DkpWeb.Data;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using System.Linq;

namespace DkpWeb.Controllers
{
[Authorize(Roles = "DKP")]
public class BillSplitController : Controller
{
readonly ApplicationDbContext mData;
Expand Down
6 changes: 1 addition & 5 deletions src/DkpWeb/Controllers/HomeController.cs
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;

namespace DkpWeb.Controllers
{
Expand Down
3 changes: 3 additions & 0 deletions src/DkpWeb/Controllers/MyDebtController.cs
Expand Up @@ -2,15 +2,18 @@
using DkpWeb.Data;
using DkpWeb.Models;
using DkpWeb.Models.MyDebtViewModels;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;

namespace DkpWeb.Controllers
{
[Authorize(Roles = "DKP")]
public class MyDebtController : Controller
{
readonly ApplicationDbContext mData;
Expand Down
1 change: 1 addition & 0 deletions src/DkpWeb/Controllers/PeopleController.cs
Expand Up @@ -8,6 +8,7 @@

namespace DkpWeb.Controllers
{
[Authorize(Roles = "DKP")]
public class PeopleController : Controller
{
private ApplicationDbContext mData;
Expand Down
14 changes: 6 additions & 8 deletions src/DkpWeb/Controllers/TransactionController.cs
@@ -1,16 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using DkpWeb.Data;
using DkpWeb.Models;
using Microsoft.AspNetCore.Authorization;
using Sakura.AspNetCore;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Sakura.AspNetCore;
using System;
using System.Linq;
using System.Threading.Tasks;

namespace DkpWeb.Controllers
{
[Authorize(Roles = "DKP")]
public class TransactionController : Controller
{
//
Expand Down Expand Up @@ -70,7 +70,6 @@ public ActionResult TopScore()
return View(q);
}

[Authorize(Roles = "DKP")]
public ActionResult Add()
{
ViewBag.People = mData.ActivePeopleOrderedByName.ToList();
Expand All @@ -90,7 +89,6 @@ public async Task<ActionResult> Delete(Guid id)
}

[HttpPost]
[Authorize(Roles = "DKP")]
[ValidateAntiForgeryToken]
public async Task<ActionResult> Add(NewTransactionModel model)
{
Expand Down

0 comments on commit 441fdb7

Please sign in to comment.