In any city or town which accepts the provisions of this section when an application for a permit has been denied under the provisions of sections seven or fifteen such applicant may appeal such denial to the board of selectmen in a town or to the mayor of a city, as the case may be, and after a hearing such selectmen or mayor may issue such permit as provided in said sections seven or fifteen.
Mass. Gen. Laws ch. 136, § 7A