Might Makes Right =/= Legality
Might makes right is how the world actually works, though, laws only matter to the extant that force is available to back them up. International law is particularly toothless in this regard, as the international community has no force on hand to back it's demands, particularly for nuclear weapon states like Israel that have a clear trump card over any attempt to compel them with force.
Probably need to go re-read the UN Charter and associated case law then, because by signing up to it Israel agreed to exactly this by abiding by said Charter and allowing UN oversight. If Israel hates it, tough shit, either leave the UN or get over it because that's what you agreed to. Funny your love and respect of the Law goes out the door when it impedes on Israel's abilities, huh?
Please cite the part of the charter that says the UN gets to decide where a country's capital is.