A senior judge was right to prevent the BBC from fully reporting a £2.6m legal claim against Scotland's child abuse inquiry, a court has ruled.
The Court of Session heard in January how Lady Smith, chairwoman of the Scottish Child Abuse Inquiry (SCAI), faced an employment tribunal claim in 2019.
Lady Smith passed orders which stopped detail of the action being reported.
The BBC then raised a judicial review of the SCAI restriction orders.
Lord Boyd has now ruled that the order covered material that was sensitive and required "to be protected", and that in those circumstances Lady Smith was able and "bound to make the order".
The 2019 employment tribunal claim - alleging discrimination, harassment and victimisation - was brought against SCAI and its chairwoman by a former senior member of the inquiry legal team.
The BBC had argued that orders to limit reporting of the claim, which was later abandoned, were beyond the powers of Lady Smith and her involvement in the case meant any restriction decision should have been made by the employment tribunal.
But Lord Boyd said he was satisfied the original restriction order and a later replacement one was not tainted by apparent bias, as the BBC had argued, and there had been no breach of the principle of open justice.
He added: "In making the restriction order the respondent was not deciding a case brought before her in a judicial capacity. The restriction order had no impact on the case brought against her in the employment tribunal."
Lord Boyd did rule that the granting of the original restriction orders was, in his opinion, "unwise".
He added: "They offended the principle of open justice. They prevented the petitioner and others from reporting the names of parties to a case in the employment tribunal and reporting that a claim had been made against the respondent which alleged discrimination, victimisation and harassment."
Lord Boyd said Lady Smith had "left herself open to a claim of bias which might have been difficult to counter" by doing so.
The Court of Session had previously heard the employment tribunal claim for £2.6m damages was brought in July, 2019, by the inquiry's former lead junior counsel, John Halley.
A news release, issued by SCAI in October 2019, confirmed existence of the claim and a denial that Lady Smith had discriminated against Mr Halley.
An initial hearing took place that month and Mr Halley abandoned the tribunal two months later.