コード例 #1
0
 public ActionResult RemovePrivilege(RemovePrivilegeViewModel model)
 {
     if (User.Identity.IsAuthenticated && User.IsInRole("Admin"))
     {
         if (StatementManager.GetPrivilegeById(model.Id) != null)
         {
             StatementManager.RemovePrivilege(model.Id);
         }
         return(RedirectToAction("Privileges", "Admin"));
     }
     return(RedirectToAction("Index", "Home"));
 }