Nothing in this article shall be deemed to:
(a)
Require the extension of any benefits to a fireman who at the time of his injury, death, or disability is acting for compensation from one other than the city, county, city and county, district, or other public or municipal corporation or political subdivision of his primary employment or enrollment.
(b)
Require the extension of any benefits to a fireman employed by a city, county, city and county, district, or other public or municipal corporation or political subdivision which by charter, ordinance, or departmental regulation expressly prohibits the activity giving rise to the injury, disability or death, whether now in force or hereafter enacted or promulgated.