From f7756ab7cc07265f5c54c4cfa5713be993d80d00 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 6 Apr 2017 11:22:05 -0400 Subject: Add wiki list to dev CP --- Project-Unite/Controllers/DeveloperController.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'Project-Unite/Controllers/DeveloperController.cs') diff --git a/Project-Unite/Controllers/DeveloperController.cs b/Project-Unite/Controllers/DeveloperController.cs index 62be944..9e3d6c0 100644 --- a/Project-Unite/Controllers/DeveloperController.cs +++ b/Project-Unite/Controllers/DeveloperController.cs @@ -15,18 +15,24 @@ namespace Project_Unite.Controllers // GET: Developer public ActionResult Index() { + if (!ACL.Granted(User.Identity.Name, "CanAccessDevCP")) + return new HttpStatusCodeResult(403); ViewBag.Developer = true; return View(); } public ActionResult Releases() { + if (!ACL.Granted(User.Identity.Name, "CanAccessDevCP")) + return new HttpStatusCodeResult(403); var db = new ApplicationDbContext(); return View(db.Downloads); } public ActionResult AddRelease() { + if (!ACL.Granted(User.Identity.Name, "CanAccessDevCP")) + return new HttpStatusCodeResult(403); if (!ACL.Granted(User.Identity.Name, "CanReleaseBuild")) return new HttpStatusCodeResult(403); ViewBag.Developer = true; @@ -41,6 +47,8 @@ namespace Project_Unite.Controllers [ValidateAntiForgeryToken] public ActionResult AddRelease(PostDownloadViewModel model) { + if (!ACL.Granted(User.Identity.Name, "CanAccessDevCP")) + return new HttpStatusCodeResult(403); if (!ACL.Granted(User.Identity.Name, "CanReleaseBuild")) return new HttpStatusCodeResult(403); if (!ModelState.IsValid) @@ -121,6 +129,17 @@ namespace Project_Unite.Controllers return RedirectToAction("Releases"); } + + [Authorize] + public ActionResult Wiki() + { + if (!ACL.Granted(User.Identity.Name, "CanAccessDevCP")) + return new HttpStatusCodeResult(403); + ViewBag.Developer = true; + var db = new ApplicationDbContext(); + var cats = db.WikiCategories; + return View(cats); + } } -- cgit v1.2.3