In Gaum and Others v Van Rensburg NO and Others (40819/17)  ZAGPPHC 52, the North Gauteng High Court ruled that the decision on same sex relationships adopted by the General Synod of the Dutch Reformed Church in 2016, reversing its previous decision of 2015, was unlawful and invalid.
In 2015, the General Synod of the Dutch Reformed Church – the Nederduits Gereformeede Kerk (NGK) – confirmed that marriage was the union of one man and one woman. At the same time, however, it also reconfirmed the equality of all people irrespective of their sexual orientation and gave recognition to the status of civil unions between persons of the same sex that are characterised by love and fidelity. It permitted ministers to solemnise such unions, though it placed no positive duty on any individual minister to do so. Crucially for what follows, it also removed the obligation of celibacy for gays or lesbians who were to be ordained as ministers or elders in the Church . In 2016, however, that decision was set aside, with the result that a gay or lesbian could only be ordained as a minister if he or she was and would remain celibate. Furthermore, ministers were not permitted to solemnise same sex civil unions . The applicants petitioned the court to declare the 2016 decision unlawful and invalid .
The Court noted the doctrine of judicial entanglement in religion [21-29], confirmed by the judgment of the Supreme Court of Appeal in Ecclesia De Lange v The Presiding Bishop of the Methodist Church of Southern Africa  ZASCA 151. The matter raised two questions: whether the 2016 decision had followed the procedure set out in the Church Order, and the substantive constitutional debate .
In its conclusion, the Court began from the position that
“Churches and religion play an important role in public life … Our Constitution protects an individual’s rights to practise religion of choice in association with others and in conformity of the Creed of that religion. Furthermore, a Court must recognise the sphere in which the sacred exists and respect the co-existence between the secular and the sacred, not forcing the one into the other. The determination of who is morally and religiously fit to be a Minister or who should be excluded for non-conformity with the dictates of the religion, falls within the core religious functions. This Court is not asked to decide doctrine. The problem is that the moment a Church steps into a Court, Court rules and the application of the law of the land is to be applied by the courts. In this matter, the Bill of Rights is invoked, and it is wrong to then employ the religious sentiments of some as a guide to the constitutional rights of others. The sacred is forced into the secular when there is prejudice to basic rights contained in the Bill of Rights; unfair discrimination with no supportive evidence of fairness renders the supreme law, the Constitution to be upheld. When courts need to address issues of discrimination, Courts do not weigh up the right to sexual orientation to that of religious freedom.” [78: emphasis added]
A further factor to consider was whether the primary purpose of the Church’s action was to achieve a worthy and important societal goal. The Church had not adduced any evidence as to why the 2016 decision was a worthy and important societal goal. The decision had sustained the views of the majority of the Church, but not those of the minority or the greater society. 
The Constitution supported a substantive concept of equality, as expressed in s.9(2), that “includes the full and equal enjoyment of all rights and freedom”; however, the 2016 decision “denies Gaum the full and equal enjoyment of all the rights and freedom of the Church” . Further, the concept of unfair discrimination recognised that equal treatment on the basis of equal worth and freedom could not be achieved by insisting on identical treatment in all circumstances before that goal was achieved:
“Each case, therefore, will require a careful and thorough understanding of the impact of the discriminatory action upon the particular people concerned to determine whether its overall impact is one which furthers the constitutional goal of equality or not. A classification which is unfair in one context may not necessarily be unfair in a different context.” 
The Church had presented no arguments or facts to demonstrate that the overall impact of the 2016 decision did, in fact, further the constitutional goal of equality, or that the exclusion was fair; and a majority decision made in light of differences of opinion about the matter
“does not further the constitutional goal of equality and is unfair. It is unfair to exclude members of the Church of their full and equal enjoyment of all rights and freedom the Church offers.” .
The impact of the decision was clear: Church members could not marry in their congregations. The riposte – that Gaum could become a member of another denomination in order to get married (what one might term the “like it or leg it” argument, which we have seen before in UK employment cases) amounted to unfair discrimination :
“Gaum individually, and as a group, did suffer patterns of disadvantage. The 2016 decision does not accommodate diversity. The discrimination is on the prohibitive grounds of equality and sexual orientation impacting on the nature and extent of the discrimination. The 2015 decision is an example of a less restrictive and less disadvantageous means to achieve the Church’s purpose. The Church submitted that the legitimate purpose of the decision was to balance rights. Nothing in our jurisprudence requires rights to be offset against each other. The Church relied on no facts or factors rendering the discrimination reasonable and justifiable. At the risk of repetition, there is no balancing of rights” [82: emphasis added].
The decision on same-sex relationships adopted during the extraordinary meeting of the General Synod of the Dutch Reformed Church during 7-10 November 2016 was declared unlawful and invalid and set aside.
The decision by the appeal body constituted by the General Task Team Legal Affairs of the Dutch Reformed Church upholding appeals against the decision on same-sex relationships of the General Synod adopted on 30 October 2015 was declared unlawful and invalid and set aside.
Am I right in thinking that the gist of this judgment is that churches in South Africa remain free to define for themselves what sorts of behaviours are sinful, but only up to a point?
Especially, churches remain free to define certain behaviours as so sinful that, as far as the orthodoxy of those churches is concerned, these behaviours, or the mere refusal to promise to abstain from them, would be enough to keep one out of positions of leadership in those churches, or to get one expelled?
But that freedom of churches to define their own doctrines of what is and isn’t sinful is automatically encroached upon by the state as soon as individual sinners, thus defined, sue those churches, and the churches (it is argued) invite the secular courts to overrule the churches’ doctrines in the name of the state, by defending, in the state’s courts, such causes of action brought by dissident individuals aggrieved by their defendant churches?
Is that the gist, please? Or have I misunderstood?