The legality of this kind is the office of the just rulers...
The legality of this kind is the office of the just rulers whom God ordered to recognize and elect as leaders, and working in their main and secondary offices by following God's instructions to the just rulers without adding, reducing, distorting, or neglecting anything of His revelation. If such just rulers who meet the previous qualities exist, then work in their offices will be legal and it will be completely legal to work, support, and hold them.
In addition, the gain from such jobs will be legal. Working with such rulers and their officials will enliven every rightful and fair matter and kill every wrong, injustice, and corruption. Therefore, to support, help, and work with such rulers is as same as calling to the acts of obedience to God and strengthening His religion. The illegality of work in governmental offices stands for the leadership of the unjust rulers and their officials beginning with the chief down to the novice.
Working with them and gaining earnings from them are prohibited and illegal. The workers and gainers of such earnings will suffer punishment, apart from the amount of the work or the earnings. Every act that is seen as support for the unjust rulers is a grand sin, because the rule of the unjust rulers kills the right wholly and enlivens the wrong wholly.
It also spreads injustice, oppression, and corruption, stays the laws of the Divine Books, kills the prophets and believers, destroys the mosques, and distorts God's norms and principles. Accordingly, it is prohibited to work with them, support them, and seek earnings from their leadership saving in cases of necessity that is similar to the necessity of having blood or meat of corpses.
Explanation of the commerce Regarding the categories of vendition and the legal and illegal purchase and vendition, all the laws are arranged for saving the nourishment of the servants (of God) and achieving their prosperity concerning their food, drink, dress, marriage, property, and the dependent affairs. It is licit for them to traffic in all the profitable matters that are indispensable for them and achieve their prosperity.
Vendition, purchase, possession, exploitation, endowment, and loan of the above-mentioned matters are licit.