Ejemplo n.º 1
0
        // GET: ProjectTasks
        public ActionResult Index()
        {
            if (coursesRepository.IsTeacherInAnyCourse(User.Identity.GetUserId(), User.IsInRole("Administrator")))
            {
                ViewBag.IsTeacher = true;
            }
            if (User.IsInRole("Administrator"))
            {
                return(View(projectTasksRepository.GetAllProjectTasks()));
            }

            return(View(projectTasksRepository.GetAllProjectTasksForUserId(User.Identity.GetUserId())));
        }