delivered the opinion of the Court.
The Superintendent of Clifton T. Perkins State Hospital contends the Circuit Court for Montgomery County erroneously granted a writ of habeas corpus to Bruce L. Zeserman, the appellee. The record shows that Zeserman *427was found not guilty by reason of insanity of the crime of attempted rape, and on November 18, 1977, was committed to the Department of Health and Mental Hygiene. He has been a patient at the Clifton T. Perkins State Hospital since that date. In his petition for writ of habeas corpus, he alleged that he was illegally detained because former Md. Code, Art. 59, § 27, which granted him a hearing as to whether or not he should be released in the community was repealed by the enactment of Art. 59, § 27 A-C, and the new statute did not give him any right to a hearing because it applies only to individuals committed after its effective date, July 1, 1979. The hearing judge agreed the appellee was indeed illegally detained and should be released.
The State contends on the other hand that the new article simply changed the procedure whereby the appellee could be granted a hearing and although it repealed Art. 59, § 27, appellee has a right to a hearing under Art. 59, § 15, pursuant to the reasoning of Dorsey v. Solomon, 435 F. Supp. 725 (D. Md. 1977)1 and under a decision of the Supreme Bench of Baltimore City (Karwacki, J.), Maryland v. Oates, decided March 3, 1980. If the question were properly before us, we would agree with the State and reverse the granting of the writ. Unfortunately for the State’s position, however, the question is not before us because the State has no right to appeal from the granting of this writ of habeas corpus. Md. Rule Z41 provides as follows:
"Any person confined or restrained in his lawful liberty within this State for any alleged offense or under any color or pretense whatsoever, or any person in his behalf, may apply for the writ, to the end that the cause of such confinement or restraint may be inquired into.”
Md. Rule Z56 governs the right to review the granting of the writ and that rule provides as follows:
"Where a person is released or discharged under *428a writ of habeas corpus on the ground that the statute or law under which such person was convicted is unconstitutional and void, in whole or in part, because it is contrary to the Constitution or Bill of Rights of this State or the Constitution of the United States, the judge shall file the memorandum required by Rule Z53 (Memorandum by Judge) within five days after ordering such release or discharge and the clerk shall forthwith transmit the memorandum, together with the original papers in the case, to the Clerk of the Court of Special Appeals in accordance with the provisions of Rule 1026 (Record on Appeal). The case shall be set by the Court of Special Appeals for hearing at the earliest practicable time, and unless otherwise ordered by the Court of Special Appeals, the parties shall be afforded the right to appear and argue as in other appeals to the Court of Special Appeals. The hearing shall be on the original papers without submission of briefs unless briefs are expressly ordered by the Court of Special Appeals.” 2
The State seeks to bring this case within Rule Z56 on the basis that the trial judge declared a statute unconstitutional. We are unable to follow the argument. The trial judge made no such determination. He merely decided that it was unconstitutional to keep the prisoner confined without a hearing and that the statute which gave him the hearing had been repealed.
The State argues vehemently that it is important that we review cases of this type because otherwise persons who constitute dangers to themselves or to others might be released upon society. The answer to that argument is *429simply we do not have the power to review any case unless it is granted by the legislature. See, State v. Layman, 28 Md. App. 332, 345 A.2d 444 (1975). Of course, there is no reason a person who is truly a danger to himself or to others may not be civilly confined under Md. Code, Art. 59, § 12.
Appeal dismissed.
Appellant to pay the costs.
. Affirmed, 604 F.2d 271 (4th Cir. 1979), except inmate must request hearing and State must assume burden of proof.
. Md. Code, Courts & Judicial Proceedings Art. § 3-706 also governs review by this Court of the issuance of a writ of habeas corpus if the law under which he is convicted is found to be unconstitutional, in whole or in part. Although there is some overlapping between the statutes and the rules, there seems to be no conflict insofar as the question before this Court is concerned. Courts & Judicial Proceedings Art. § 3-707 also provides for an application for leave to appeal in this Court for denial of bail or if excessive bail has been required.