The answer to your question is as follows:
The government officials are instructed about the limits of the relevant departments and the responsibilities are explained to them. After being appointed as an officer you are responsible for implementing the national laws. Therefore, if you have to permit for anything that is allowed constitutionally but which goes against the Shari’ah, you can permit for it unwillingly and seek forgiveness of Allah for being forced to permit for what is against the Shari’ah, and try your best to avoid such a situation. And Allah knows best
Darul Uloom Waqf Deoband
This answer was collected from the official website of Darul Uloom Deoband Waqf. The institution is based in India and the answers are provided in accordance to the Hanafi Fiqh.