Example #1
0
        public ActionResult Accept(int id)
        {
            var ts = new TaskService();

            if (!ts.IsUserAllowedToDo(id, SessionStorage.User.Id, TaskAction.Accept))
            {
                return(RedirectToAction("Index", "Home"));
            }

            ts.AcceptTask(id, SessionStorage.User.Id);
            return(RedirectToAction("Show", new { id }));
        }