With discipline rules changing due to the abolishment of capital punishment, the Naval Discipline Act of 1957 was passed by an act of the British Parliament. This act was the law governing how discipline was enforced until it was largely modified by the Armed Forces Act 2006 in 2008. I guess it took a while to get through Parliament.
The Human Rights Act of 1988 abolished all forms of capital punishment that fell under the Naval Discipline Act of 1957.
The act covers courts-martial and criminal offenses by British sailors, both officer and enlisted. Further amendments changed how the judge advocates were appointed in order to prevent undermining the independent authority of the court.
Because it was effectively overridden, the act was repealed in 2009. A common unified code of judicial authority now applies to all forces of the British military.