Appeals court upholds judge's decision to ID visitors