UNCLOS Article 25.3 does permit the unilateral suspension of rights of innocent passage through designated parts of territorial waters, provided notice is given by the coastal state. Apart from the Redbeard Rum aspect of whose waters were involved, the Russians acted within UNCLOS.
Article 25.3 states :
The coastal State may, without discrimination in form or in fact among foreign ships, suspend temporarily in specified areas of its territorial sea the innocent passage of foreign ships if such suspension is essential for the protection of its security, including weapons exercises. Such suspension shall take effect only after having been duly published
Unfortunately, the Russ have discriminated in form by only imposing their exclusion zone for warships and "temporarily" is not intended to mean several months. Some (admittedly potentially partial) discussion on the subject.
Russia’s Illegal Restriction of Navigation in the Black Sea