Commissioned officers, warrant officers and enlisted men and women and former commissioned officers, warrant officers and enlisted men and women of the United States Army, United States Air Force, United States Navy, or any reserve component thereof, California National Guard, State Military Reserve, California National Guard Reserve, California Defense and Security Corps, California State Guard, California Reserve and Retired List or the active militia, may, with his or her consent, be detailed for active duty with a security section which the Adjutant General is hereby authorized to maintain in his or her office. A commissioned officer, warrant officer or enlisted man or woman who is detailed for duty as provided in this section may be paid compensation in any grade or rank lower than the person actually holds provided the commissioned officer, warrant officer or enlisted man or woman voluntarily waives all compensation in excess of the lower grade or rank.