public ActionResult MyStatements() { if (User.Identity.IsAuthenticated && (User.IsInRole("Admin") || User.IsInRole("User"))) { return(View(StatementManager.GetFormatStatementListViewModel(User.Identity.GetUserId(), false, "none", true))); } return(RedirectToAction("Index", "Home")); }
public ActionResult NotConsideredStatements() { if (User.Identity.IsAuthenticated && User.IsInRole("Admin")) { ViewBag.Type = "NotConsidered"; return(View("~/Views/Kindergarten/Statements.cshtml", StatementManager.GetFormatStatementListViewModel("none", false, "NotConsidered", true))); } return(RedirectToAction("Index", "Home")); }
public ActionResult NotConsideredStatements(string id) { if (User.Identity.IsAuthenticated && (User.IsInRole("Admin") || (User.IsInRole("Administrator") && User.Identity.GetUserId() == id))) { ViewBag.Id = id; ViewBag.Type = "NotConsidered"; return(View("~/Views/Kindergarten/Statements.cshtml", StatementManager.GetFormatStatementListViewModel(id, true, "NotConsidered"))); } return(RedirectToAction("Index", "Home")); }
public ActionResult Statements(string id) { if (User.Identity.IsAuthenticated && (User.IsInRole("Admin") || (User.IsInRole("Administrator") && User.Identity.GetUserId() == id))) { ViewBag.Id = id; ViewBag.Type = "All"; return(View(StatementManager.GetFormatStatementListViewModel(id, true))); } return(RedirectToAction("Index", "Home")); }