before such separation, was authorized by law to engage in or supervise the prevention, detection, investigation, or prosecution of, or the incarceration of any person for, any violation of law, and had statutory powers of arrest or apprehension under
section 807(b) of title 10, United States Code (article 7(b) of the Uniform Code of Military Justice);