Example #1
0
        public ActionResult Index()
        {
            var user       = User.Identity.GetUserId();
            var myProjects = userPHelper.ListProjectsForUser(user);

            if (User.IsInRole("Admin"))
            {
                return(View(db.Projects.ToList()));
            }
            else
            {
                return(View(myProjects.ToList()));
            }
        }