If you are required to have a permit or a license for just about anything, the authorities have the right to stop you and check to ensure that your permit is in place.
Sounds like a legal search to me.
“Sounds like a legal search to me.”
It wasn’t a search. The officer had him detained and while escorting him outside the gun became visible in his back waistband. The officer merely pulled the gun out as the dude passed by him.
Subsequently it was found that he was a felon in possession of a stolen gun.