Union wins court fight with BA over strike ban