Legislature gives police union win with discipline rules