Unions representing public workers in Massachusetts will now be allowed to charge non-members costs associated with representing them through the grievance process.

The Democratic-controlled House and Senate this week overwhelmingly overturned Republican Gov. Charlie Baker's recommended changes to the bill.

The governor said those changes would still have let unions work with non-members, charge them for representation, and provide access to the information public employee unions need to communicate with members and non-members.

But Baker opposed language in the bill that would grant union officials access to information like the cellphone numbers of non-union members.

The new law is a response to a 2018 U.S. Supreme Court ruling that threatened to weaken the finances of public sector unions.

A single Republican lawmaker in each chamber opposed the override.