public ActionResult CreatePetition(_CreatePetitionViewModel model) { if (!Request.IsAuthenticated) { throw new AuthenticationException(); } if (ModelState.IsValid) { var data = new PetitionContainer { GroupId = model.GroupId, IsPrivate = model.IsPrivate, Tags = model.TagTitles, Text = model.Text, Title = model.Title }; var petition = VotingService.CreatePetition(data, UserContext.Current.Id); UserContext.Abandon(); return(RedirectToAction("petition", petition.Controller, new { id = petition.Id })); } if (model.GroupId != null) { View("../group/createpetition", model); } return(View("../user/createpetition", model)); }