So you might not like the current law, but a political party must respect the law. Thus you can campaign against it, but remain within the law. If someone defends the law and points out it's obligations and the rights it gives, you can not get rid of them from your party as that's unlawful. And fundamentally undemocratic and against your human rights to have your own beliefs. It's fundamentally democratic to have internal voices that hold different views within your party. Indeed they may add to your development of your party line because they are the people who tell you inconvenient truths about why your proposed law has negative unintended effects and give you an idea of how well your policy will go down with the wider public. But there are also cavets and limitations present.
In terms of the fundamental belief of each party, I don't think the main parties realise that their main belief is very narrow. It has to be based on the wider public understanding of what their party stands for. This is the reasonableness test. For this there's got to be a low bar to reflect public engagement levels and educational levels on politics and not something buried in your small print or details on policy. Let's call this the rather politically incorrect 'thicko test'. I appreciate this isn't the best term but it conveys the point in a way thats understandable. What's the lowest bar for a member of the public understand the difference between each party. And actually it's very tied up with their names. Thus the Green Party's fundamental interest - based on how the public understand the party - is green issues. The Labour Party is about workers rights and socialism. The Liberal Democrats believe in liberal democracy. And the Conservatives are about preservation of traditional concepts over radical change and are opposed to state intervention to change society as a general rule, particularly along economic lines.
However someone who is a party official, has a balancing act about towing the official policy and their own beliefs when acting in an official capacity.
I think the closest comparison in terms of case here is probably Tim Farron: he holds personal views which are known but he understands where the party sits on the policy and why others hold those views. He respects those other views and understands how representative of both the wider public and party membership they are. He also understands where the law sits on those issues and what would be deemed discriminatory. He can not legally be kicked out the party for having those views. He can internally voice his opinion and can say this is my personal belief and why he holds that belief as a party representative.
What he can't do is use his position to promote and publicly campaign externally to change party policy and effectively be seen to 'misrepresent' the official Green Party line. Again let's use the reasonableness argument. Would a member of the public after hearing him speak in his capacity as a party official, understand whether he was speaking in a party or personal capacity and would this impact on how that member of the public understood the official party line? If it would lead them to believe that the party policy was more gender critical than it is, that's problematic.
This is where Tim Farron was also unfairly treated as when it comes to the reasonableness test, the general public wouldn't understand him to hold his personal religious beliefs and where he has expressed them (including in the past before holding office) he has made it very clear they are personal beliefs and not representative of the party as a whole. The Lib Dems were therefore unfair in forcing him to step down in the way they did but were fair in allowing him to remain a member of the party despite having views inconsistent with the party line. It would have been difficult for Farron to have brazen it out having lost the confidence of key party members so he effectively had to resign in practice because his position was pretty untenable as he'd lost authority. But he would have been within his rights to stay and to try and regain that authority. If the party had then taken a decision to remove him by procedure rather than his own understanding that continuing probably was not in the party interest, it could have fallen foul of this ruling.
Tim Farron couldn't however express personal views that he believes in dictatorships. Because that's at odds with the core principles of the LDs. Anyone who is openly a climate change denier, is fundamentally at odds with the Green Party. Thus yes you could kick someone out for those beliefs because your agenda is clearly at odds to destroy the party from within and you are knowingly trying to undermine it. It's an act of hostility and deliberate attempt at sabotage of a political party and is therefore not democractic. The intent is very clear to destroy.
With regards to Jeremy Corbyn. He was arguably acting in a way that was unlawful as it's discriminatory and creating a hostile environment for certain members who had a protected characteristic. What he says goes further than criticism along political lines of a nation state and he's tried to impose his personal views on the party, with little distinction or understanding of the boundary of personal opinion and official party representative and how that reflects on the party as a whole. See the reasonableness test above and compare with how Tim Farron has acted. Corbyns opinions on the matter was front and central whereas Farrons are much more downplayed and he wasnt making repeated speeches about the subject in question. Corbyn was therefore bringing the party into disrupt with the public and at odds with the Equality Act.
Ali's case is different. And this is why the Equality Act is an important factor. No one can say that Ali's views are discriminatory, if he's drawing attention to existing law, the purpose of the law and how the law recognises sex. He isn't creating what others can term a hostile environment for others - he's referring to the law and how it's still relevant and how it should continue to be. He's not bringing the party into disrupt because of where the law stands. Because the law is about balancing needs of two groups who have protected status and explicitly singles out sex as having exemptions he certainly can't be accused of being discriminatory. Stating this as a front and central point personally can't bring the party into disrepute either because sex is a widely understood term by the public and recognised as being important for various reasons to PREVENT discrimination. But he could be fundamentally misrepresenting to the public what the party line is, if he is acting in an official capacity, campaigns too externally on the matter and doesn't make it explicitly clear that it's a personal view. If there is a blurring of lines, that's where the problem is. He should be able to hold official position, state that he recognises it's a contentious issue, that his personal views do not necessarily reflect the party line and internally lobby for a change to party position. I think the 'loudness' test is relevant here. How loudly was he speaking on the subject and in what setting? (see Tim Farron above for a reference point).
I hope that accurately and fairly reflects the situation and the differences. It's always about reasonableness as a concept. How do people reasonably understand the message?
Now, if I was Natalie Bird reading that judgement, I'd be feeling very happy today. If I was the Lib Dems, not so much. That case definitely jumps out at me. Funny how the lawyers at the LDs seem to already be on the case here. It's almost as if they realise there's an issue in this department...