Reversing the trial court, this decision holds that plaintiff is entitled to an attorney fee award under CCP 1021.5 based on her earlier appellate victory on her claim for disability retirement benefits from CalPers. Merely enforcing existing law or securing a published opinion doing so is not necessarily enough to show that the action conferred a substantial benefit on the public, but here the prior published opinion established some important principles regarding when public employees are entitle dto disability retirement benefits. That opinion did confer a substantial public benefit, mandating an award of fees under section 1021.5.