예제 #1
0
        public ActionResult Index()
        {
            if (!User.IsInRole("Admin"))
            {
                return(RedirectToAction("NotFound", "Home"));
            }
            Repos <ApplicationUser> repos = new Repos <ApplicationUser>();
            IndexModel model = new IndexModel();

            model.users             = repos.ReadAll();
            model.partialBanModel   = new PartialBanModel();
            model.partialRolesModel = new PartialRolesModel();

            return(View(model));
        }