is it sharia?

Well the idea of “everyone is equal regardless of their religion in front of a Qadhi or judge” comes from Shariah and perhaps you should read the proper concept of Millet System.

The millet concept has a similarity to autonomous territories that has long been the European norm for dealing with minority groups. The millet system has a long history in the Middle East, and is closely linked to Islamic rules on the treatment of non−Muslim minorities (dhimmi). The Ottoman term specifically refers to the separate legal courts pertaining to personal law under which minorities were allowed to rule themselves (in cases not involving any Muslim) with fairly little interference from the **Ottoman government](Government of the classical Ottoman Empire - Wikipedia).**
People were bound to their millets by their religious affiliations (or their confessional communities), rather than their ethnic origins, according to the millet concept.[2]](Millet (Ottoman Empire) - Wikipedia) The head of a millet, most often a religious hierarch such as the Greek Orthodox Patriarch of Constantinople, reported directly to the Ottoman Sultan. The millets had a great deal of power — they set their own laws and collected and distributed their own taxes. All that was insisted was loyalty to the Empire. When a member of one millet committed a crime against a member of another, the law of the injured party applied, but the ruling Islamic majority being paramount, any dispute involving a Muslim fell under their sharia−based law.
Later, the perception of the millet concept was altered in the 19th century by the rise of nationalism within the Ottoman Empire.

:slight_smile: