Two courts have made separate rulings to prevent a far-right group from holding a rally in Sydney to mark 10 years since the Cronulla riots.

The New South Wales Supreme Court has banned Party for Freedom chairman Nicholas Folkes from holding the "memorial" event at Cronulla on Saturday on the grounds it would stir up racial hatred.

Separately, the Federal Court has ruled in favour of an application to prevent any other groups or individuals from commemorating the anniversary.

This weekend marks a decade since the racially-motivated violence that erupted in the Sydney suburb in 2005.

In the Supreme Court today, the judge ruled the holding of the public assembly was prohibited.

She made no order in regards to costs, with each party to pay their own.

In the later hearing in the Federal Court, Mr Folkes agreed he would not hold the rally or address any public assembly in Cronulla on Saturday.

He also agreed to do all things necessary to state on his website, the party's website and Facebook pages that the event was cancelled.

While in the witness stand, he told the court he wanted to celebrate Australian culture by holding a halal-free barbeque instead.

Outside court he said it was an attack on free speech and branded the ruling "sharia" law.

"This is censorship, this is sharia law in action," he said.

"Where's the freedom of speech? A peaceful person like myself doesn't have a criminal record, doesn't promote violence. I'm just absolutely shocked."

Before the ruling, Mr Folkes told the ABC the memorial was about celebrating Australian culture, not violence.

"I believe it's an important time when Australians did stand up," Mr Folkes said.

Sydney GP and Muslim community leader Jamal Rifi and the Sutherland Shire Council together applied for the Federal Court ruling.

Dr Rifi said the group's right to freedom of speech "should not impinge on our rights as citizens".

"They have every right to express their view but their right is not absolute," he said

"We also have a right as a citizen of this country not to be insulted, not to be humiliated and not to be intimidated."