No punishment, except as may be authorized by the Director of Corrections, shall be inflicted and then only by the order and under the direction of the wardens. Nothing in this section shall be construed as a limitation or impairment of the authority of the Board of Prison Terms in exercising its functions.