コード例 #1
0
 private ActionResult EditCourse(Course model)
 {
     if (!loggedIn())
     {
         return(RedirectToAction("Index", "Login", new { redirectAction = "CourseDetail", redirectController = "Course", courseID = model.ID }));
     }
     if (!(checkPermission("admin") || checkPermission("professor")))
     {
         return(RedirectToAction("AccessDenied", "Home"));
     }
     proxy.updateCourse(model);
     return(RedirectToAction("CourseDetail", new { courseId = model.ID }));
 }