mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 17:22:15 +00:00
I think Ash is getting to me.
This commit is contained in:
parent
a615b53305
commit
3c95bab2d5
2 changed files with 3 additions and 4 deletions
|
@ -16,14 +16,14 @@ namespace Project_Unite.Controllers
|
||||||
{
|
{
|
||||||
//We have a custom ACL implementation so we do not need to use the ASP.NET role system to check if a user has an ACL rule.
|
//We have a custom ACL implementation so we do not need to use the ASP.NET role system to check if a user has an ACL rule.
|
||||||
[Authorize]
|
[Authorize]
|
||||||
|
[RequiresAdmin]
|
||||||
public class AdminController : Controller
|
public class AdminController : Controller
|
||||||
{
|
{
|
||||||
private ApplicationDbContext db = new ApplicationDbContext();
|
private ApplicationDbContext db = new ApplicationDbContext();
|
||||||
|
|
||||||
[Authorize]
|
public ActionResult Index(string id = "home")
|
||||||
[RequiresAdmin]
|
|
||||||
public ActionResult Index()
|
|
||||||
{
|
{
|
||||||
|
ViewBag.Page = id;
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
@{
|
@{
|
||||||
ViewBag.Title = "Administration Control Panel";
|
ViewBag.Title = "Administration Control Panel";
|
||||||
var db = new ApplicationDbContext();
|
|
||||||
|
|
||||||
string homeclass = (ViewBag.Page == "home") ? "active" : "";
|
string homeclass = (ViewBag.Page == "home") ? "active" : "";
|
||||||
string siteconfigclass = (ViewBag.Page == "siteconfig") ? "active" : "";
|
string siteconfigclass = (ViewBag.Page == "siteconfig") ? "active" : "";
|
||||||
|
|
Loading…
Reference in a new issue