The ruling sets the stage for a potential trial in a lawsuit that alleges racial profiling in the patrols in Maricopa County, Ariz., and would further limit Sheriff Joe Arpaio's immigration authority after Washington yanked his federal powers this month.