Exemplo n.º 1
0
        //GET USER
        public List <ApplicationUser> getAllManagerAndDeveloperUser(string adminId)
        {
            var users = TicketRepo.GetAllUserList(x => x.Id != adminId);
            List <ApplicationUser> developers = new List <ApplicationUser>();

            // var list = users.Where(x => UserManager.IsInRole(x.Id, "NormalUser")).ToList();
            foreach (var user in users)
            {
                if (AdminLogic.CheckIfUserIsInRole(user.Id, "Developer") || AdminLogic.CheckIfUserIsInRole(user.Id, "Manager"))
                {
                    developers.Add(user);
                }
            }
            return(developers);
        }