I am aware that you cannot be a revenue passenger on a foreign airline flying domestic US routes. But how do codeshares affect this?
For example, I want to fly Los Angeles to Honolulu. I buy my ticket on UA flight 10000, but this is actually a Air New Zealand flight that is codeshared with UA on its way to the south pacific. Can I fly just the LAX-HNL route as long as I have a UA ticket?