Dharma ethics is read through the Bhagavad Gita and the Dharmasastra literature, texts many centuries old. The same framework is still being argued over in a live legal forum today, and the argument reached India's highest court within the last decade.
The Sabarimala temple in Kerala, dedicated to the deity Ayyappa, traditionally excluded women between roughly ten and fifty years of age, the years generally associated with menstruation, from entering the shrine. The temple's own justification rested on Ayyappa's status as a naishtika brahmachari, a lifelong celibate, and on the ritual purity code surrounding that vow, framed by defenders of the practice as a matter of the deity's own dharma rather than a judgment on women's status generally. In 2018, the Supreme Court of India, ruling in Indian Young Lawyers Association versus State of Kerala, held the exclusion unconstitutional by a four to one majority, finding that a religious practice could not override the constitutional guarantee of equal treatment regardless of how deeply rooted the practice was in the temple's own tradition.
The ruling did not settle the matter socially. Large protests followed, some worshippers and temple authorities continued to resist the court's order in practice, and the case remains a live example of dharma understood as a role specific duty, exactly the logic Krishna gives Arjuna in the Gita, colliding directly with a constitutional claim that no such role specific duty can be allowed to override an individual's basic equality before the law.