diff options
| author | Michael <[email protected]> | 2017-04-06 11:22:05 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-04-06 11:22:05 -0400 |
| commit | f7756ab7cc07265f5c54c4cfa5713be993d80d00 (patch) | |
| tree | e38446157d31dd651a12d3820ac2446e865d8083 /Project-Unite/Controllers/DeveloperController.cs | |
| parent | e6aa1c4fd5ead9fbe6ca5d31200c16acf293afd0 (diff) | |
| download | project-unite-f7756ab7cc07265f5c54c4cfa5713be993d80d00.tar.gz project-unite-f7756ab7cc07265f5c54c4cfa5713be993d80d00.tar.bz2 project-unite-f7756ab7cc07265f5c54c4cfa5713be993d80d00.zip | |
Add wiki list to dev CP
Diffstat (limited to 'Project-Unite/Controllers/DeveloperController.cs')
| -rw-r--r-- | Project-Unite/Controllers/DeveloperController.cs | 19 |
1 files changed, 19 insertions, 0 deletions
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); + } } |
