Byzantine doesn't even begin to describe it..
In Mexico for example, a person who is not a citizen must obtain a work permit from the Department of Immigration unless you happen to have Inmigrado status. Inmigrado means you have been in Mexico for five years as a legal immigrant and have all the privileges of the Mexican citizen with the exception of voting rights. The seriousness of working without proper documentation in Mexico is reflected in the penalty should you be caught. The crime comes with a generous sentence of 18 months in a Mexican jail or deportation. Each global locale that requires work permits also has unique rules which apply. In the case of Mexico the work permit, if obtained, is good only for the employer specified on the documentation. Should you change employers, the lengthy process must begin anew.
sw