Any prison official or official of child protection or correction centers who imposes undue sanctions or deprivations on inmates or prisoners, or uses unnecessary rigor with them, shall be punished with the penalty of special disqualification from employment or public office for a period of two to six years.