private ActionResult Delete(ClientCertificateUserInputModel[] users)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    foreach (var user in users.Where(x => x.Delete))
                    {
                        var settings = this.clientCertificatesRepository.GetClientCertificatesForUser(user.Username);
                        foreach (var setting in settings)
                        {
                            this.clientCertificatesRepository.Delete(setting);
                        }
                    }
                    TempData["Message"] = "User Certificates Deleted";
                    return RedirectToAction("Index");
                }
                catch (ValidationException ex)
                {
                    ModelState.AddModelError("", ex.Message);
                }
                catch (Exception)
                {
                    ModelState.AddModelError("", "Error deleting client certificates.");
                }
            }

            return Index();
        }
 public ActionResult Index(string action, ClientCertificateUserInputModel[] users)
 {
     if (action == "new") return Configure();
     if (action == "delete") return Delete(users);
     return RedirectToAction("Index");
 }