The European Court of Justice has ruled that Dutch authorities are able to ban foreigners from coffee shops selling cannabis if they so wish, adding that the city of Maastricht was perfectly within its rights when it passed a law in 2005 stopping foreigners entering cafes that sell marijuana.