/// <summary> /// GEt all user /// </summary> /// <returns>List of User</returns> public List <User> GetAllUsersByTeam(User currentUser) { if (currentUser.IsAdministrator && !currentUser.TeamId.HasValue) { return(UserDataAccesor.GetAllUsers()); } return(currentUser.TeamId.HasValue ? UserDataAccesor.GetAllUsersForTeam(currentUser.TeamId.Value) : new List <User>()); }