All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
If the government prohibits this for the general interest, then it is an obligation to abide by this prohibition. However, if the prohibition is for the interest of a specific company, or specific people, then it is not an obligation to abide by this prohibition and it is permissible to contravene it unless a Muslim fears that he will be harmed.
On the other hand, man-made laws which are set by governments are not all alike in regard to being obliged to abide by them. For example, it is an obligation to abide by some of these laws and it is not permissible to contravene them –which are the laws that achieve the general interest of the public and which do not contradict the Islamic Law, like the traffic laws and the like –and it is not an obligation to abide by some other laws, which are the laws that contradict the Islamic Law, or which are made for the interest of some people at the expense of others. Therefore, it is permissible to contravene these laws but if a Muslim fears that this will cause harm to him, then he should not humiliate himself or expose himself to harm.
Allaah Knows best.