The judgement does overrule the SC ruling because it does take into consideration the fact that Gonçalo Amaral was a retired public servant.
It does not overrule the SC decision. In law it could not.
The SC only considered whether straightforward possible defamation was counter balanced by a right to Freedom of Expression. It decided in favour of the latter if what was being expressed was an honest opinion. So there was no libel.
This judgement has decided that unlawful actions by a public servant can harm individuals, and those individuals are due damages for such a tort. That is nothing to do with libel, but to do with a duty of confidentiality.
Libel requires that the assertion be false. This judgement applies whatever the truth status of the material.
Let me give you an example:
Celebrity X visits a doctor and tests positive for HIV.
The doctor shares this with the press.
The information is true but still causes harm.
Because the information was privileged, the celebrity could sue for damages to counter the harm done.