It is unlawful for any public officer or employee, directly or indirectly, to deprive, attempt to deprive, or threaten to deprive any person of employment, position, work, compensation, contracts, loans, grants, appropriations or benefits provided principally from public funds for any political activity, support or opposition to any candidate, party or measure in any election.