Ejemplo n.º 1
0
        public ActionResult RegisterUser()
        {
            var model = AuthenticationDB.GetUsers();

            if (User.IsInRole(nameof(RoleEnum.Supervisor)))
            {
                int adminRole = (int)RoleEnum.Admin;
                model = model.Where(x => !x.Roles.Select(y => y.RoleId).Contains(adminRole)).ToList();
            }
            // View Model Conversation here....
            return(View(model));
        }