SECTION 51. Paragraph (f) of said section 131 of said chapter 140, as so appearing, is hereby amended by striking out the second paragraph and inserting in place thereof the following 1026 paragraph:- Any applicant or holder aggrieved by a denial, revocation, suspension or restriction placed on a license, unless a hearing has previously been held pursuant to chapter 209A, may, within either 90 days after receiving notice of the denial, revocation or suspension or within 90 days after the expiration of the time limit during which the licensing authority shall respond to the applicant or, in the case of a restriction, any time after a restriction is placed on the license pursuant to this section, file a petition to obtain judicial review in the district court having jurisdiction in the city or town in which the applicant filed the application or in which the license was issued. If after a hearing a justice of the court finds that there was no reasonable ground for denying, suspending, revoking or restricting the license and that the petitioner is not prohibited by law from possessing a license, the justice may order a license to be issued or reinstated to the petitioner or may order the licensing authority to remove certain restrictions placed on the license.