Nordea Bank is free to prevent its employees from investing in Bitcoin and other cryptocurrencies in their own time, a Danish court ruled.

The risks associated with cryptocurrencies justify the restriction, according to a verdict published on the Copenhagen-based court’s website late Monday. Denmark’s union for financial industry employees had filed suit against Nordea, saying the ban interfered with employees’ personal lives.

In a January 2018 memo, Nordea told staff that “the risks were too high” because the cryptocurrency market isn’t regulated and had been linked to criminal activity, including money laundering. Employees might damage the reputations of Nordea and its customers, the bank said.

Read more: Nordea CEO Defends Bitcoin Ban Amid Fears Staff ‘Can Lose a Lot’

The restriction didn’t cover financial instruments tied to cryptocurrencies that Nordea had sold to clients; nor did it apply to any cryptocurrencies that employees might have owned before the ban.

“We filed suit because of the principle that everyone obviously has a private life and the right to act as a private individual,” Kent Petersen, the union’s chairman, said in a statement. “It was important for us and our members to establish what rights managers have. In this case, it was more far-reaching than what we find to be appropriate.”