“What is a philosophical belief?” It’s a question worthy of philosophers. But it wasn’t Aristotle or Bertrand Russell who had to ponder this question – it was the employment judge at Glasgow, Frances Eccles.

The 2010 Equality Act codified Britain’s equality laws. It prohibits direct and indirect discrimination and victimisation and harassment. At its core is the idea of protected characteristics. These nine characteristics include disability and sex, sexual orientation and race. But they also include the concept of “religion and belief". The legislation – with helpful vagueness – defines the concept of belief as “any religious or philosophical belief”. So that’s all clear as mud.

But take some practical examples. If I refuse to serve you in my bar because you’re a Catholic? I’m a sectarian bigot. If you’re sacked you from your job because you believe in climate change and the bossman doesn’t? I owe you damages.

But what happens if I’m a Ministry of Defence employee, and the MoD decides to withdraw my security clearance and suspend me from its employment – after I declare my candidacy to stand as depute leader of the SNP?

Chris McEleny was a site electrician at the MoD munitions plant site in Beith when his clearance was revoked. The SNP councillor was subsequently interviewed in his home by the National Security Vetting body – part of the MoD. The official inquisition covered his attitude to Trident, Irish politics, and his own mental health.

McEleny quit, arguing that he had been directly discriminated against because of his philosophical beliefs. Specifically, his belief that Scotland should be an independent country.

Judge Eccles last week handed down her judgment on whether Mr McEleny’s belief in Scottish independence met the test of being sufficiently “philosophical” to warrant protection. The case law is open, the legislation still fairly new. The MoD argued that it was not, claiming that McEleny’s constitutional politics were just an “opinion”, arguing that this “opinion that Scottish people will be better off in an independent country is not a belief that he is incapable of changing in response to persuasive political debate”.

McEleny disagreed. The political philosophy is open to debate, but the legal tests are clear. To fall under the protections of the Equality Act, a belief must be “genuinely held”. It can’t be a fly-by-night “opinion or viewpoint based on the present state of information available”.

These beliefs must pertain to "a substantial aspect of human life and behaviour” and be “worthy of respect in a democratic society”. That means “not incompatible with human dignity and not conflicting with fundamental rights of others”. So no joy for homophobes or racists. No protection either for folk with strong views on the proper composition of a Victoria Sponge.

But on all these tests, said Judge Eccles, McEleny’s belief in Scottish independence met the mark. He was genuine. The cause he believed in mattered, was significant, and upheld human dignity.

An encouraging judgment, for a former employee of Her Majesty’s Government, who has waited for justice for too long.

Andrew Tickell is a law lecturer and columnist