We decide in this case whether a licensing commission has the power to condition the grant of a common victualler’s2 license on a limitation of the hours within which an applicant may operate. A judge in the Superior Court concluded that the limitation was beyond the authority conferred by the Legislature on the licensing commission, and granted summary judgment in favor of the plaintiff applicant. We transferred the *533case here on our motion and now vacate the grant of summary judgment.
On January 3, 2000, John A. Mello, the owner of The Blues Diner in Revere (diner), filed a complaint in the Superior Court, seeking to annul a decision of the License Commission of Revere (commission). Mello had submitted an application for a common victualler’s license to operate the diner for twenty-four, hours each Friday and Saturday. The commission granted Mello a common victualler’s license, but restricted his hours of operation to from 5 a.m. to midnight. Mello complained that the commission lacked the authority under G. L. c. 140, § 2, the common victualler statute, to place any restrictions on his common victualler’s license and, alternatively, that placing any restriction on his license was arbitrary and capricious. He alleged that at least six other competing businesses located within a mile of his diner were permitted to operate twenty-four hours each day. Following a hearing on Mello’s motion for summary judgment, a judge in the Superior Court agreed that the commission was without authority to restrict the diner’s hours of operation, and ordered that Mello be permitted to operate the diner on a twenty-four hour basis.
General Laws c. 140, § 2, vests the commission with the authority to grant common victualler’s licenses at its discretion. That statute does not provide for judicial review of a discretionary decision of the commission, and thus the only relief available to Mello is by way of an action in the nature of certiorari. Bermant v. Selectmen of Belchertown, 425 Mass. 400, 404-405 (1997). In his complaint, Mello sought relief in the nature of certiorari and declaratory relief. The commission did not move to dismiss so much of the complaint that sought declaratory relief. After discovery, Mello filed a motion for summary judgment, seeking only declaratory relief. The commission opposed the motion, but did not argue that declaratory relief was not an available remedy. The judge granted the declaratory relief sought by Mello.
Ordinarily, we would not be inclined to address the merits of a claim where a plaintiff proceeds on a basis to which he is not entitled. Here, the judge considered and determined those issues that would have been presented for appellate review had Mello *534sought relief in the nature of certiorari: the judge decided that the commission’s limitations on Mello’s license constituted legal error. We therefore review the merits of his decision. See Newbury Jr. College v. Brookline, 19 Mass. App. Ct. 197, 201-202 (1985) (“the judge’s decision comes to grips with the questions which are posed by review in the nature of certiorari: Were the proceedings before the town body in accordance with law? . . . Did the town body apply relevant criteria to its decision? . . . Did it act arbitrarily, unreasonably or capriciously?” [citations omitted]). See also Debnam v. Belmont, 388 Mass. 632, 635 (1983) (“it is the duty of this court in an action in the nature of certiorari to correct substantial errors of law that affect material rights and are apparent on the record”).
The issue turns on an interpretation of G. L. c. 140, § 2, which states in pertinent part that a licensing commission “may grant licenses to persons to be . . . common victuallers.” It provides further that the statute “shall not require” licensing commissions to grant a common victualler’s license “if, in their opinion, the public good does not require it.” Id. In support of the judge’s decision that the commission exceeded its authority, Mello contends that only the Legislature has the power to enable a licensing commission to condition a license by limiting the hours within which a business may operate. He points to G. L. c. 138, § 12, which expressly sets the operating hours of establishments granted alcoholic beverage licenses, as an example of such a legislative grant. In contrast, the Legislature did not provide for such authority in the granting of a common victualler’s license, from which Mello concludes that any such restrictions are beyond the reach of the licensing commission.
A commission with the power to approve or disapprove a license carries with it the power to grant the license on some condition. See, e.g., Fragopoulos v. Rent Control Bd. of Cambridge, 408 Mass. 302, 304 (1990); MacNutt v. Police Comm’r of Boston, 30 Mass. App. Ct. 632, 635 (1991). See also Southern Pac. Co. v. Olympian Dredging Co., 260 U.S. 205, 208 (1922). In Goodwin v. Department of Pub. Utils., 351 Mass. 25, 26 (1966), we held that the power to grant a restricted license was apparent from statutory language that permitted the licensing commission broad discretion to deny the license. The wide *535latitude conferred to deny an application or revoke a license, we said, “on a reasonable construction, includes according the lesser privilege.” Id.
The statute governing a common victualler’s license provides that the commission may exercise broad discretion in determining whether to grant the license. See Liggett Drug Co. v. License Comm’rs of N. Adams, 296 Mass. 41, 50-53 (1936). See also Newbury Jr. College v. Brookline, supra at 202-203 (discussing diversity in breadth of discretion that local authorities enjoy in licensing matters). Consistent with our prior cases it is apparent that the statute governing the issuance of a common victualler’s license implicitly permits the licensing commission to grant such a license on certain conditions.
Mello’s motion for summary judgment was based exclusively on the issue of the commission’s statutory authority to impose conditions. Because we have concluded that the commission had the statutory authority to grant Mello a restricted common victualler’s license, to prevail on his remaining allegations Mello must show that, when it imposed the particular restrictive conditions at issue here, the commission “proceeded upon grounds erroneous in law or [has] otherwise violated [his] legal rights.” Liggett Drug Co. v. License Comm’rs of N. Adams, supra at 44.
We vacate the order granting Mello summary judgment. The case is remanded to the Superior Court for further proceedings consistent with this opinion.
So ordered.
A “common victualler” is one who keeps a restaurant or public eating house. See Commonwealth v. Meckel, 221 Mass. 70, 72 (1915).