President Bukele has received legal permission to step down and run for re-election, with an interim president appointed to finish the rest of his first term.