Local soviet ultimately. Soviet government wanted to bring tsar to Moscow to trial, directed that multiple times, ultimately they send Trotsky to bring tsar to Moscov, and if impossible to conduct trial on place as the representative. But Trotsky didn't managed to get there before white army surrounded Yekaterinburg (which later fell so they would certainly take the Romanovs with them).
The only source about Lenin ordering shooting of Romanovs is of course Trotsky who said that Lenin and Sverdlov talked to him and ordered him to do so. But of course, typical for Trotsky, he only pulled out that revelation after becoming renegade when Lenin and Sverdlov were both long dead, so we could safely assume that did not happen in reality.