Under English real estate law, while there are some constraints on your ability to make covenants, the rules are quite broad. A century ago, racial discrimination wasn't illegal or clearly contrary to public policy in most common law jurisdictions – indeed, many of them had explicitly racially discriminatory laws on the statute book – so racially restrictive covenants weren't obviously disallowed. The US, with its constitutional prohibition on discrimination in the 14th Amendment, was actually the only common law country in which there was a decent argument they weren't legal – but SCOTUS rejected that argument at first, then changed its mind over 20 years later. In the 1945 case Re Drummond Wren, the Ontario High Court ruled them illegal – but it cited the just signed United Nations Charter as grounds for doing so.