
43 Cal.App.2d 53 (1941)
NORMAN E. DIERSSEN, Appellant,
v.
CIVIL SERVICE COMMISSION OF THE CITY AND COUNTY OF SAN FRANCISCO, Respondent.
Civ. No. 11364. 
California Court of Appeals. First Appellate District, Division One.  
February 17, 1941.
 Cross & Brandt for Appellant.
 John J. O'Toole, City Attorney, Norman Sanford Wolff, Deputy City Attorney, and Grover O'Connor for Respondent.
 PETERS, P. J.
 Petitioner appeals from a judgment of the Superior Court of San Francisco denying and dismissing with prejudice his petition for a writ of mandate. By the writ, petitioner seeks to compel the Civil Service Commission to place his name as number one on the list of eligibles for appointment to the position of Superintendent of Agriculture. It appears that petitioner received the highest grade in the examination held for the position, and was placed at the top of the tentative eligibility list, but, upon objections being filed by the applicant second in rank on the ground that petitioner did not have the necessary residence qualification, the commission, after several hearings, removed petitioner's name from the list. Objection was also filed to petitioner on the ground that he did not have the required experience qualification, but the commission did not determine this question in view of its ruling that he lacked the residence requirement. As announced in the examination scope circular, the required residence was residence in San Francisco for one year immediately preceding January 27, 1939, the closing date for filing applications to take the examination.
 The commission filed a return to the alternative writ of mandate, alleging its determination, after hearing, against petitioner's claim of residence. To this return were attached photostatic copies of various documents showing that at various *56 times between 1933 and 1938 petitioner had stated, sometimes under oath, that his residence was in Sacramento County. Among these exhibits was a copy of petitioner's affidavit of registration, under the permanent registration law, showing that petitioner had registered on February 5, 1936, and, at that time, under oath, gave Elk Grove, Sacramento County, as his residence. Also attached were photostatic copies of pages from the Roster of Voters which sets forth the names of those who voted in the primary election of August 30, 1938, and the general election of November 8, 1938. From this roster it appears that petitioner voted in these elections and signed the roster, giving his address as Elk Grove. In his application to take the examination he gave January 4, 1934, as the date he became a resident of San Francisco, claiming to have been a resident of that city since that date.
 Upon motion of respondent, the trial court, without the taking of evidence, dismissed the petition for a writ. The respondent had moved for dismissal on the grounds that petitioner had not come into court with clean hands; that the court was without jurisdiction to interfere with the determination of the commission, and that the petition did not state a cause of action. The judgment of the trial court, as shown by the recitals therein, is predicated on all three grounds.
 [1] Petitioner urges that the commission had no authority to require that an examinee must have one year's residence prior to the closing date for filing applications to take the examination; that under the charter all that is required is one year's residence prior to appointment. Aside from the fact that the petition for the writ was not based on that theory, and, in fact, alleged residence in San Francisco since January 4, 1934, petitioner's interpretation of the charter provisions is not justified.
 The Charter of San Francisco became effective January 8, 1932. Section 144 provides in part: "Any citizen having the qualifications prescribed by section 7 of this charter may submit himself for any examination under conditions established by the civil service commission. ... "Section 7 of the charter was amended in 1933 (Stats. 1933, p. 2805) and reads in part as follows: "All employees of the City and County shall be citizens and shall have been residents thereof, for at least one year prior to the appointment, unless otherwise specifically provided in this charter ...". Petitioner contends *57 that under section 7 of the charter, supra, the only requirement is that he be a resident one year prior to his appointment, not one year's residence prior to taking the examination. Eligible lists continue in effect for two years, and may be continued in effect for four years. Thus, under petitioner's interpretation, a person who is a nonresident when he takes the examination may qualify for appointment within the two or four-year period. This is not a reasonable nor proper interpretation of the two sections. Section 7 refers to appointees, not to examinees. Moreover, section 7 refers to all appointments--both civil and noncivil service appointments. Section 144, supra, however, refers specifically to examinees. Petitioner's interpretation would mean that every citizen of the United States would be eligible to take every examination, but only those who had been residents of San Francisco for one year prior to their appointment could be appointed to a position. The interpretation of petitioner completely disregards the words, "having the qualifications prescribed by section 7 of this charter". Those words would be meaningless if petitioner's construction is correct.
 For these reasons, we think the only proper interpretation of the two sections is that section 144 imposes as conditions precedent to taking an examination the requirements of section 7--citizenship and one year's residence in San Francisco. Section 7, applying to noncivil service, as well as civil service employees, requires citizenship and one year's residence prior to appointment. This interpretation gives effect to both sections of the charter, is reasonable, and provides a workable system.
 Using this interpretation as its basic premise, in support of the judgment, the respondent urges that, since petitioner did not file an affidavit denying the genuineness and due execution of the written exhibits attached to the return, under section 448 of the Code of Civil Procedure, their genuineness and due execution were admitted; that they demonstrate that petitioner was a resident of Sacramento County during the time in question; that at any rate petitioner has filed under oath, conflicting statements as to his residence; that this demonstrates that he did not come into court with clean hands; that the clean hands doctrine applies to mandamus proceedings.
 [2] There can be no doubt that a mandamus proceeding is essentially equitable in nature, and that the clean hands doctrine is applicable to such a proceeding. (Hutchison v. *58 Reclamation Dist. No. 1619, 81 Cal.App. 427 [254 P. 606].) If the evidence should show that petitioner with full knowledge of the nature of his acts, under oath, had stated his residence for voting purposes to be Sacramento, and later proved that he was a resident of San Francisco for the same period, he very likely would be guilty of a criminal offense. (Sec. 139 of Elections Code.) Under such circumstances, the clean hands doctrine might well be applicable. [3] The difficulty with this argument as applied to the facts of the instant case, however, is that the trial court did not apply the doctrine after the facts had been shown by evidence, but upon the pleadings. Apparently, this was done on the theory that, because the petitioner had failed to file an affidavit denying the genuineness and due execution of the exhibits to the return, under section 448 of the Code of Civil Procedure, he must be deemed to have admitted those facts. We have serious doubts as to whether section 448 of the Code of Civil Procedure applies to documents of the type here involved. The documents are merely evidentiary matter to support the allegation in the return that petitioner did not possess the residential qualification. The defense to the petition was that the commission had found, on competent evidence, that petitioner was not a resident of San Francisco for the required period. To support that defense the exhibits were attached. We do not believe that section 448 of the Code of Civil Procedure was intended to apply to written instruments of that type. Moreover, even if the section were applicable, all that would be admitted by failing to file the affidavit would be that the documents were genuine and had been executed by petitioner. The petitioner could lawfully attack the instruments for any cause not going to their genuineness or due execution. He could, without further pleading, introduce competent evidence to sustain any other defense, such as fraud, mistake, undue influence and the like. (See cases collected 21 Cal.Jur., p. 168, in sec. 114.) We are, therefore, of the opinion that the judgment appealed from cannot be sustained on the theory that the record demonstrates, as a matter of law, that petitioner did not come into court with clean hands.
 The judgment, however, was not based solely on that ground. The trial court also held that it had no jurisdiction to interfere with the action of the commission, and that the petition did not state a cause of action. The two points are *59 integrally connected. They are based on the following premises: (1) That local boards, such as the civil service commission, may lawfully be invested with judicial or quasi judicial power; (2) that the Charter of San Francisco vests such power, so far as the question of residence is concerned, in the commission; and (3) that where such power is vested a petition is defective that does not allege facts to show that the commission acted arbitrarily, capriciously or fraudulently. These points will be considered in order.
 [4] The question as to whether by charter provision local boards, such as a civil service commission, may be invested with judicial fact finding powers seems never to have been seriously questioned in this state. The books are full of cases expressly or impliedly holding that where fact finding powers have been conferred on local boards their determination will not be set aside unless an abuse of discretion is pleaded and proved, that is, unless it be alleged and proved that the board acted arbitrarily, capriciously or fraudulently. (Croly v. City of Sacramento, 119 Cal. 229 [51 P. 323]; Stanley-Taylor Co. v. Supervisors, 135 Cal. 486 [67 P. 783]; Barto v. Supervisors, 135 Cal. 494 [67 P. 758]; County of Yolo v. Joyce, 156 Cal. 429 [105 P. 125]; Imperial Water Co. v. Supervisors, 162 Cal. 14 [120 P. 780]; Maxwell v. Civil Service Commission, 169 Cal. 336 [146 P. 869]; Pratt v. Rosenthal, 181 Cal. 158 [183 P. 542]; Mann v. Tracy, 185 Cal. 272 [196 P. 484]; Garvin v. Chambers, 195 Cal. 212 [232 P. 696]; Klevesahl v. Byington, 1 Cal.App.2d 671 [37 PaCal.2d 179]; Ludolph v. Board of Police Commrs., 30 Cal.App.2d 211 [86 PaCal.2d 118].) It is true that in Standard Oil Co. v. State Board of Equalization, 6 Cal.2d 557 [59 PaCal.2d 119], and Drummey v. State Bd. of Funeral Directors, 13 Cal.2d 75 [87 PaCal.2d 848], and other recent cases, it has been held that state-wide administrative boards constitutionally cannot be vested with judicial or quasi judicial power. Those cases are predicated on the theory that article VI, section 1, of the state Constitution vests the entire judicial power of the state in the courts. All of those cases, including the earlier cases of Tulare Water Co. v. State Water Com., 187 Cal. 533 [202 P. 874], and Dept. of Public Works v. Superior Court, 197 Cal. 215 [239 P. 1076], upon which the later cases are predicated, expressly recognized that the holdings therein were applicable only to state-wide boards and did not apply *60 to local boards. Thus, in the Drummey case, supra, at page 81, it is stated: "The theory of the Tulare and Standard Oil cases is that, if the legislature attempted to confer judicial or quasi-judicial power on state-wide administrative boards, the statutes would be unconstitutional as in violation of section 1 of article VI of the state Constitution, which vests the entire judicial power of the state in the courts, except as to local boards, and the railroad and industrial accident commissions, which are governed by special constitutional provisions." (Italics added.) Quite obviously, what the Supreme Court had, in mind when it stated in the Drummey case, supra, that, "local boards ... are governed by special constitutional provisions", were the broad provisions of article XI, section 6, of the Constitution dealing with the powers of chartered cities. That section, so far as pertinent herein, provides that, "Cities and towns hereafter organized under charters framed and adopted by authority of this Constitution are hereby empowered ... to make and enforce all laws and regulations in respect to municipal affairs, subject only to the restrictions and limitations provided in their several charters. ..." Moreover, article XI, section 8 1/2, subdivision 4, provides that, "It shall be competent in any charter framed in accordance with the provisions of this section, ... for any city or consolidated city and county, and plenary authority is hereby granted, subject only to the restrictions of this article, to provide therein or by amendment thereto, the manner in which, the method by which, the times at which, and the terms for which the several county and municipal officers and employees whose compensation is paid by such city or city and county ... shall be elected or appointed. ..." Obviously, a civil service system is strictly a municipal affair. Under these provisions a chartered city or city and county may lawfully confer quasi judicial power on boards or commissions dealing strictly with municipal affairs, such as the power to determine facts, and, if such finding is made, the courts may interfere only where the board acts arbitrarily, capriciously, or fraudulently. Stated another way, the courts are empowered to interfere with the findings of such boards only where a clear abuse of discretion is alleged and proved. If there is any substantial evidence to support the board's findings the courts are powerless to interfere. This is apparently the law even as to state-wide boards where the board has fact finding powers and is not attempting to take away *61 an existing right. (McDonough v. Goodcell, 13 Cal.2d 741 [91 PaCal.2d 1035, 123 A.L.R. 1205].) We, therefore, conclude that by charter provision a city or city and county may lawfully confer on local boards dealing with strictly municipal affairs judicial or quasi judicial power.
 [5] The sections of the Constitution above referred to, however, do not automatically confer such power on local boards, nor do they require a city or city and county to so provide in their charter--they merely empower such city or city and county to so provide in their charter. If the charter does not expressly or impliedly confer such power, the power does not exist. (French v. Cook, 173 Cal. 126 [160 P. 411]; Sheehan v. Board of Police Commrs., 197 Cal. 70 [239 P. 844]; Sheehan v. Board of Police Commrs., 47 Cal.App. 29 [190 P. 51].) This, then, presents the second question mentioned above--does the Charter of San Francisco expressly or impliedly confer judicial or quasi judicial power on the Civil Service Commission to pass on the question of the residence of applicants to take a civil service examination? Clearly, the charter confers on the commission the power to prepare examinations, to grade them, to prepare tentative and final eligible lists from which appointments shall be made, and to generally supervise and control the civil service system. Section 21 of the charter confers on boards operating under the charter, the general power to hold hearings, subpoena witnesses, etc., relative to the affairs under their control. Section 140 of the charter creates the commission "which is charged with the duty of providing qualified persons for appointment to the service of the city and county." Section 141 provides that the commission "shall be the employment and personnel department of the city and county and shall determine appointments on the basis of merit and fitness. ..." Section 144 above-referred to, and, as interpreted in this opinion, requires one year's residence in San Francisco as a condition precedent to taking any examination. Section 145 provides for the giving of examinations by the commission and for the creation by it of eligible lists. Section 147 expressly commands the commission to remove the name of any person on an eligible list who has secured his place on the list "by fraud, concealment of fact or violation of commission rules." Section 147.1 added in 1938 (Stats. 1938, Ex. Sess., p. 132), provides for the posting of grades after an *62 examination and for the inspection of examination papers, and then provides: "The Civil Service Commission shall have power to correct any error which in its judgment may have occurred in the rating of any participant in said examination, and to alter said published or posted list of eligibles and to make changes accordingly therein which in the opinion of said commission may be justified by any re-examination of said papers, questions, answers, marks or grades given in said examination. ..."
 [6] Respondent argues that section 147.1, supra, expressly confers discretionary power on the commission to correct errors not only in examination papers but also in the sworn application of an examinee, and that this includes the power to pass on the question of residence as set forth in the application. Great emphasis is placed upon the language conferring upon the commission "power to correct any error which in its judgment may have occurred in the rating" of an examinee. It is argued that, if, because of a false statement as to residence, an examinee has been placed on the tentative list, an error in rating has occurred. Petitioner argues that section 147.1 applies only to errors in connection with the marking of examination papers. While there can be little doubt that section 147.1 was intended primarily to confer discretionary power on the commission to correct errors in the marking of the papers, there is much merit in the argument that the grant of power is broad enough to include the power to correct any error that results in a false rating, including power to pass on the correctness of statements made in the application, which includes the power to pass on the question of residence. However, it is no necessary to base this portion of the opinion solely on section 147.1, supra. A reading of the various sections of the charter above-referred to demonstrates that San Francisco, exercising its plenary power with regard to the method and manner of appointments, has set up a complete scheme for the making of such appointments. It is further apparent that the complete administration of this plan has been conferred upon the commission. The obvious intent of the sections as a whole is that power has been conferred on the commission to pass on the qualifications of examinees, including not only such qualifications as are disclosed by the examination, but also such other qualifications such as age, residence, experience, etc. It is also quite clear that it is the intent of the charter that the administration of this plan *63 should not be interfered with by the courts unless it be shown that the commission acted fraudulently, capriciously or arbitrarily, or in violation of the provisions of the charter. That is but another way of stating that in passing on such questions, including the question of residence, the commission acts in a quasi judicial capacity.
 [7] The only question left for determination is whether the petition states a cause of action. So far as pertinent here, the petition alleges that petitioner took the examination; was placed first on the tentative list; that a protest was filed on the ground that petitioner lacked both the experience and residence qualifications; that the commission determined that he did not possess the residence requirement; that the action of the commission is without right "and in utter disregard of the proofs, oral and documentary, adduced by petitioner before respondent as aforesaid, which proofs demonstrate that petitioner is, and ever since on or about the 4th day of January, 1934, has been, a bona fide legal resident of said City and County and State."
 This petition, as a matter of law, is insufficient to state a cause of action for a writ of mandate. If the charter did not confer discretionary or quasi judicial power on the commission to pass on the question of residence, the petition here involved would be sufficient. It was obviously framed on that theory. But, as already held, the charter does confer discretionary or quasi judicial power on the commission to pass on that question. Since that is so, it must be alleged in a mandamus proceeding attacking its action that it has acted arbitrarily, fraudulently, capriciously, or in abuse of discretion. An averment that petitioner's evidence would support a conclusion contrary to that of the commission does not properly or at all allege an abuse of discretion, in the absence of a denial of the existence of other evidence supporting the action of the board exercising judicial power. These principles are well-settled. [8] In Bennett v. Brady, 17 Cal.App.2d 114, 116 [61 PaCal.2d 530], the rule is stated as follows: "In passing upon the sufficiency of the petition to state a cause of action, the attached transcript of evidence cannot be considered for the purpose of supplying any deficiency in its allegations. (People v. Reid, 195 Cal. 249 [232 P. 457, 36 A.L.R. 1435].) A petition in substantially the same form was held in Hogan v. Retirement Board, 13 Cal.App.2d 676 [57 PaCal.2d 520], not to state a cause of action because it failed *64 to show respondents had acted arbitrarily, capriciously, fraudulently, or without due regard for the applicant's rights. To state a cause of action, the petition must set forth facts showing that a pension ought to have been allowed, and that respondents' refusal to do so was an abuse of their discretion. (16 Cal.Jur. 861.) If all the evidence produced at the hearings was susceptible of the sole construction that petitioner was entitled to a pension, respondents abused their discretion in refusing to award it and can be compelled by mandate to do so. (Bank of Italy v. Johnson, 200 Cal. 1 [251 P. 784].) However, the petition fails to bring itself within this rule, for it merely alleges that petitioner's evidence, not all the evidence, established and proved the allegations of her application. For aught that appears, her evidence may have conflicted with other evidence or supported different inferences. The general demurrer was properly sustained." See, also, County of San Luis Obispo v. Gage, 139 Cal. 398, 409 [73 P. 174], where it was held that an allegation that a board rejected certain claims "without right and against facts" was insufficient where the board is vested with discretionary power.
 The allegation in the petition here involved, above quoted, amounts to no more than a charge that petitioner's evidence produced before the commission was sufficient to support a finding of residence, or that such evidence, standing alone, would compel such finding. The allegation is, in effect, that the action of the commission was in disregard of the evidence produced by petitioner, without reference to what other evidence may have shown. There is a complete failure to deny the existence of other evidence. The allegation fails to comply with the test laid down in the cases referred to above. For that reason, the petition fails to state a cause of action.
 The judgment appealed from is affirmed.
 Knight, J., and Ward, J., concurred.
