public ActionResult AddOwnerAsync(int id, string email) { CurrentUserModel.ValidateProject(id); User u = CurrentServiceModel.GetUserByEmail(email); if (u != null) { CurrentUserModel.AddProjectOwner(id, u.Id); return(Content("OK")); } else { return(Content("")); } }
public ActionResult SetDevStatus(int id, int stagId, int value) { CurrentUserModel.ValidateProject(id); SourceTag stag = CurrentUserModel.GetSourceTag(stagId); if (stag.ProjectId != id) { throw new InvalidOperationException("Invalid source tag"); } stag.DevStatus = (DevStatus)value; CurrentUserModel.UpdateSourceTag(stag); return(Content("OK")); }
public ActionResult Edit(int id) { CurrentUserModel.ValidateProject(id); ViewData["Creating"] = false; return(View("Create", CurrentUserModel.GetProject(id))); }
public ActionResult RemoveOwner(int id, int userId) { CurrentUserModel.ValidateProject(id); CurrentUserModel.RemoveProjectOwner(id, userId); return(RedirectToAction("Index", new { id = id })); }