
38 Cal.App.4th 182 (1995)
45 Cal. Rptr.2d 82
ALAN BAUGHMAN, Plaintiff and Appellant,
v.
THE STATE OF CALIFORNIA et al., Defendants and Respondents.
Docket No. B073544.
Court of Appeals of California, Second District, Division Six.
September 12, 1995.
*185 COUNSEL
Baltaxe & Baltaxe and George Baltaxe for Plaintiff and Appellant.
Daniel E. Lungren, Attorney General, and Felix E. Leatherwood, Deputy Attorney General, for Defendants and Respondents.
OPINION
GILBERT, J.
Alan Baughman appeals from the judgment after jury verdict in favor of respondents, the State of California et al.[1] Baughman's suit states that respondents wrongfully destroyed floppy computer disks containing his research while they searched premises in which he rented space pursuant to a search warrant describing various computer hardware and software. The warrant did not describe the subject disks.
Baughman contends the trial court erred in granting judgment on the pleadings and dismissing his causes of action for invasion of his privacy and *186 for violation of his civil rights under title 42 United States Code section 1983.[2] He also challenges the trial court's ruling that a statutory privilege precluded prosecution of his cause of action for conversion. Although his loss is unfortunate, we must affirm.

FACTS
Baughman rented space from Terminal Technician, Inc. (Terminal Tech), to engage in the business of designing computer hardware and software. An investigation revealed that computer hardware and software had been stolen from California Polytechnic State University at San Luis Obispo (Cal Poly). The police obtained a search warrant to search, inter alia, "all rooms and buildings, ... garages, ... storage areas and containers used ... within the curtilage of said premises...." The warrant described certain computer hardware and software which it stated "could be stored on ... 1. Tape, 2. Computer Memory, 3. Disk, 4. Paper." Among the premises to be searched was Terminal Tech.
On November 24, 1986, pursuant to the search warrant, various Cal Poly police officers and other staff entered Terminal Tech and removed material and equipment over a three-day period. During the course of this search, the respondents destroyed floppy computer disks containing the sole source of Baughman's research over many years. These disks were not described in the search warrant.
On November 20, 1987, Baughman filed a complaint alleging various causes of action regarding the search. After the trial court granted judgment on the pleadings as to his civil rights cause of action under section 1983, Baughman filed an amended complaint alleging causes of action for invasion of privacy, conversion, and intentional and negligent infliction of emotional distress.
The amended complaint asserted that respondents unreasonably executed the search warrant by remaining an unreasonable length of time, by exceeding the scope of the warrant and by exceeding the scope of their authority pursuant to Education Code section 89560, among other things. Respondents answered this complaint and trial commenced.
After an in limine hearing regarding the search warrant and the search, the trial court granted respondents' motion for judgment on the pleadings and dismissed Baughman's claims for invasion of privacy and emotional distress. Baughman proceeded on the sole remaining cause for conversion.
*187 After Baughman completed his case-in-chief, the trial court expressed its belief that there is a privilege protecting public employees from liability for instituting or prosecuting such proceedings within the scope of their employment. (See Gov. Code, § 821.6.) Nevertheless, the trial court never ruled on the privilege. Baughman voluntarily dismissed his claim for conversion, and the trial court permitted him to amend his pleadings to conform to proof of negligence. The jury returned a defense verdict on the remaining claim for negligence and this appeal ensued.

DISCUSSION

Standard of Review
(1) Because a motion for judgment on the pleadings is similar to a general demurrer, the standard of review is the same. (Ramirez v. USAA Casualty Ins. Co. (1991) 234 Cal. App.3d 391, 397 [285 Cal. Rptr. 757].) We treat the pleadings as admitting all material facts properly pleaded, but not contentions, deductions or conclusions of fact or law. When leave to amend is not given, we determine whether the complaint states a cause of action and whether the defect can reasonably be cured by amendment. If it can be cured, the trial court has committed reversible error. Otherwise, we affirm. The burden of proof is squarely on the plaintiff. (See Blank v. Kirwan (1985) 39 Cal.3d 311, 318 [216 Cal. Rptr. 718, 703 P.2d 58].) The judgment of dismissal will be affirmed if it is proper on any grounds stated in the motion, whether or not the trial court relied on any of those grounds. (Carman v. Alvord (1982) 31 Cal.3d 318, 324 [182 Cal. Rptr. 506, 644 P.2d 192].)
We independently construe statutes as a matter of law according to their purpose and intent. (Jones v. California Interscholastic Federation (1988) 197 Cal. App.3d 751, 756 [243 Cal. Rptr. 271].) If there is no liability as a matter of law, leave to amend should not be granted. (Ramirez v. USAA Casualty Ins. Co., supra, 234 Cal. App.3d at p. 397.) We consider evidence outside the pleadings which the trial court considered without objection. (O'Neil v. General Security Corp. (1992) 4 Cal. App.4th 587, 594, fn. 1 [5 Cal. Rptr.2d 712].)

Section 1983 Action Is Barred Because Police Acted in Official Capacity
(2) Baughman asserts that the trial court improperly dismissed his section 1983 cause of action because campus police had no authority to conduct the search at a location more than one mile from the campus.
Section 1983 provides, in pertinent part, that "[e]very person who, under color of any statute, ... of any State ..., subjects, or causes to be *188 subjected, any citizen of the United States ... to the deprivation of any rights, privileges, or immunities secured by the Constitution and laws, shall be liable...." (Italics added.)
We look to federal law to interpret the language of section 1983. (Williams v. Horvath (1976) 16 Cal.3d 834, 840-841 [129 Cal. Rptr. 453, 548 P.2d 1125].) In Will v. Michigan Dept. of State Police (1989) 491 U.S. 58, 71 [105 L.Ed.2d 45, 58, 109 S.Ct. 2304], the United States Supreme Court held that neither a state nor its officials acting in their official capacities are "persons" within the meaning of section 1983. The high court reasoned that although state officials are people, a suit against a state official in his official capacity constitutes a suit against the official's office and not against the person. (491 U.S. at p. 71 [105 L.Ed.2d at p. 58].)
The instant complaint states that Barrett and Carmack "are members of the California Polytechnic Police Section and acted as policemen in the City of San Luis Obispo...." Baughman sued Pollack and Grimes as being "on the staff of the defendants Trustees of the California State University and California Polytechnic State University ... (Cal Poly)." Although Pollack and Grimes were "sometimes hereinafter ... referred to as `individual defendants,'" Baughman sued these defendants in the capacity of "acting as agents of the entity defendants...." Respondents were sued in their official capacity as state officers and not as individuals. (Will v. Michigan Dept. of State Police, supra, 491 U.S. at p. 71 [105 L.Ed.2d at p. 58]; see also Hafer v. Melo (1991) 502 U.S. 21 [116 L.Ed.2d 301, 112 S.Ct. 358].) Accordingly, the trial court properly barred the cause of action under section 1983. The allegations of this cause cannot be cured to state a cause of action.
Baughman asserts the officers were not acting in their official capacity because they had no right to serve the warrant. Education Code section 89560 states, in pertinent part, that campus police "shall not exercise their powers or authority except ... in an area within one mile of the exterior boundaries of each campus ... and ... as provided in Section 830.2 of the Penal Code." (Italics added.) Section 830.2 of the Penal Code provides, in pertinent part, that "[t]he following persons are peace officers whose authority extends to any place in the state:
".... .... .... .... .... .... ....
"(d) A member of the California State University Police Departments ... provided that the primary duty of the peace officer shall be the enforcement of the law within the area specified in Section 89560 of the Education Code." (Italics added.)
*189 There are no cases delineating the authority of campus police under these statutes. Education Code section 89560 does not absolutely limit the exercise of the powers or authority of campus police to within one mile of campus. It expressly provides that such officers shall exercise such powers and authority within one mile and as provided by Penal Code section 830.2. Penal Code section 830.2 states that the authority of such officers extends throughout the state, even though the primary duty of such officers is within one mile of campus.
Here, the various alleged crimes which led to this investigation occurred on campus and other places. The purpose of Education Code section 89560 and Penal Code section 830.2, when read together, is to ensure that campus police may fulfill their duties as peace officers when the need extends beyond a one-mile radius of a campus. Under the facts here, the purpose of these statutes would be thwarted if campus police were precluded from continuing an investigation which began on campus.

Invasion of Privacy
(3a) Baughman contends that the trial court erred by granting respondents' motion for judgment on the pleadings as to his cause of action for invasion of privacy. We disagree. One may be liable for intruding into the private affairs of another only if the intrusion is "`... highly offensive to a reasonable person.'" (Hill v. National Collegiate Athletic Assn. (1994) 7 Cal.4th 1, 25-26 [26 Cal. Rptr.2d 834, 865 P.2d 633] [drug testing of student-athletes by National Collegiate Athletic Association by means of observing and testing urine specimens does not violate right to privacy]; Miller v. National Broadcasting Co. (1986) 187 Cal. App.3d 1463, 1483 [232 Cal. Rptr. 668, 69 A.L.R.4th 1027]; Cal. Const. art. I, § 1.) The right to be left alone is far from absolute. (Hill, supra, at p. 37.)
(4) To prosecute an action for invasion of privacy, one must establish: 1. a legally protected privacy interest, 2. a reasonable expectation of privacy under the circumstances and 3. conduct by the defendant which seriously invades that privacy. (Hill v. National Collegiate Athletic Assn., supra, 7 Cal.4th at pp. 39-40.) A defendant may prevail by negating any of the three elements of the tort just stated, or by pleading and proving as an affirmative defense that the invasion is justified because it substantially furthers one or more countervailing, societal interests. (Id. at p. 40.) The plaintiff may rebut these assertions by establishing feasible, effective, less intrusive alternatives. (Ibid.) These issues are threshold questions of law for the trial court to decide. (Ibid.) If the undisputed material facts disclose no reasonable expectation of privacy under the circumstances, the question may be adjudicated as a matter of law. (Ibid.)
*190 Courts consider, among other things, "`the degree of the intrusion, the context, conduct and circumstances surrounding the intrusion as well as the intruder's motives and objectives, the setting ..., and the expectations of those whose privacy is invaded.'" (Hill v. National Collegiate Athletic Assn., supra, 7 Cal.4th at p. 26, quoting Miller v. National Broadcasting Co., supra, 187 Cal. App.3d at pp. 1483-1484.) "A plaintiff's expectation of privacy in a specific context must be objectively reasonable under the circumstances, especially in light of the competing social interests involved." (Hill, supra, at pp. 26-27.)
(3b) An "[i]nvasion of a privacy interest is not a violation of the state constitutional right to privacy if the invasion is justified by a competing interest." (Hill v. National Collegiate Athletic Assn., supra, 7 Cal.4th at p. 38.) Among the legitimate competing societal interests is the public interest in exposing and prosecuting serious crime. (Id. at p. 26; see also People v. Muchmore (1979) 92 Cal. App.3d 32, 36-37 [154 Cal. Rptr. 488].) The Fourth Amendment to the United States Constitution only proscribes unreasonable searches and seizures. Courts determine whether a search is reasonable by a balancing test which weighs the gravity of the governmental interest or public concern, and the degree to which its conduct advances that concern, against the intrusion. (Hill, supra, at p. 29.) The level of scrutiny used by courts depends on the specific kind of privacy interest involved, the nature and seriousness of the invasion and countervailing societal interests. (Id. at pp. 30-31, 34.) Where informational interests are at stake, as here, courts avoid using the rigid standards of compelling state interests or strict scrutiny. (Id. at p. 30.)
In the instant case, respondents entered Terminal Tech pursuant to a search warrant which permitted a thorough search of the premises as part of an official criminal investigation of the theft of a variety of computer hardware and software. The warrant stated that the information sought could be found on a variety of media, including floppy disks. Baughman had rented space inside the premises of Terminal Tech to engage in computer research, amidst an array of computer hardware and software. Under these circumstances, the trial court did not err in deciding that Baughman did not state a cause of action for invasion of his privacy. The investigation of this serious crime pursuant to a search warrant is a defense which justifies the invasion of his privacy as a matter of law. The complaint could not be cured to state such a cause of action.

Immunity
(5) Baughman opines that the trial court erred when it indicated it would refuse to permit his cause of action for conversion to go to the jury because *191 respondents' acts were privileged, presumably under Government Code section 821.6. After the completion of Baughman's case-in-chief, the trial court asked to hear any motions from Baughman's counsel.
In response, Baughman's counsel asked whether the trial court "believes there's a privilege here which applies to the conversion. If there is, I have a motion to conform to proof...." The trial court stated that it "believes there is a privilege here." Counsel then moved to conform to proof of negligence. The court granted the motion to conform and counsel moved to dismiss the count for conversion and proceeded on his theory of negligence.
Assuming the trial court's comment on the privilege constitutes a ruling, it is a correct one. Government Code section 815.2 states, "Except as otherwise provided by statute, a public entity is not liable for an injury resulting from an act or omission of an employee of the public entity where the employee is immune from liability." Government Code section 821.6 provides that "[a] public employee is not liable for injury caused by his instituting or prosecuting any judicial or administrative proceeding within the scope of his employment, even if he acts maliciously and without probable cause."
The Court of Appeal considered Government Code sections 815.2 and 821.6 in the case of Amylou R. v. County of Riverside (1994) 28 Cal. App.4th 1205 [34 Cal. Rptr.2d 319]. Amylou R. was a victim of a crime. During investigation of the crime, an antagonistic relationship developed between Amylou and the investigating officers. Amylou sued the county for various torts concerning the actions of the officers during the investigation. She received an award and the county appealed from the judgment.
The county claimed, inter alia, that it was immune from liability under Government Code sections 815.2 and 821.6. The Court of Appeal agreed and modified the judgment accordingly. (Amylou R. v. County of Riverside, supra, 28 Cal. App.4th at p. 1214.)
The county was immune under Government Code section 815.2, because the acts about which Amylou complained were committed by public employees acting within the scope of their employment during the institution and prosecution of a judicial proceeding. (Amylou R. v. County of Riverside, supra, 28 Cal. App.4th at p. 1209.)
The Amylou court explained that "[b]ecause investigation is `an essential step' toward the institution of formal proceedings, it `is also cloaked with immunity.' [Citations.]" (Amylou R. v. County of Riverside, supra, 28 *192 Cal. App.4th at pp. 1209-1210.) Amylou's complaint concerned acts which were "incidental to the investigation of the crimes, and since investigation is part of the prosecution of a judicial proceeding, those acts were committed in the course of the prosecution of that proceeding." (Id. at p. 1211.)
The Amylou court concluded that the immunity provided by Government Code section 821.6 "bars liability for any injury caused by the prosecution of the judicial proceeding, even if the person suffering the injury is not the target of that prosecution." (Amylou R. v. County of Riverside, supra, 28 Cal. App.4th at pp. 1211, fn. omitted, 1212-1213.) Immunity under Government Code section 821.6 is dependent on how the injury is caused, and not according to the identity of the person claiming injury. (28 Cal. App.4th at p. 1211.) Thus Government Code section 821.6 shields investigative officers from liability for injuries suffered by witnesses or victims during an investigation. (28 Cal. App.4th at p. 1211.) Officers are also immune from claims made by those who are not the actual targets of the investigation of the prosecution, but who happen to be injured by decisions an officer makes during the course of such investigation. (Id. at pp. 1213-1214.) Officers must be free to use their honest judgment uninfluenced by fear of litigation or harassment of themselves in the performance of their duties. (Id. at pp. 1212-1213.)
Baughman confuses the issue of whether the officers may have been negligent during the investigation with the issue of whether they were acting within the scope of their employment while prosecuting the instant search warrant. Under Government Code section 821.6, the officers' actions during the investigation were cloaked with immunity, even if they had acted negligently, maliciously or without probable cause in carrying out their duties. (See Johnson v. City of Pacifica (1970) 4 Cal. App.3d 82 [84 Cal. Rptr. 246], and other cases cited in Amylou R. v. County of Riverside, supra, 28 Cal. App.4th at pp. 1209-1210.)
Respondents here acted within the scope of their duties when Baughman's disks were destroyed. They are police officers who destroyed computer disks while investigating a crime pursuant to a search warrant concerning such media. That warrant commanded the officers to search "all rooms and buildings, ... garages, ... storage areas and containers ... within the curtilage of" Terminal Tech. The search warrant stated that the software programs sought "could be stored on ... 1. Tape, 2. Computer memory, 3. Disk, and 4. Paper."
Baughman argues that because the search warrant did not name him or specify the disks, the officers were not acting within the scope of their *193 employment. We disagree. Government Code section 821.6 frees investigative officers from the fear of retaliation for errors they commit in the line of duty. (Amylou R. v. County of Riverside, supra, 28 Cal. App.4th at pp. 1212-1213.) It gives them immunity for the loss Baughman suffered as a result of their investigation.
Accordingly, we affirm the judgment. Each party is to bear its own costs.
Stone (S.J.), P.J., and Yegan, J., concurred.
Appellant's petition for review by the Supreme Court was denied December 14, 1995.
NOTES
[1]  Of the numerous parties originally prosecuting this case, Baughman is the only appellant remaining. The only respondents remaining are the state, California Polytechnic Police Officers Ray Barrett and Wayne Carmack and California Polytechnic staff members James Grimes and Neil Pollack.
[2]  All further statutory references are to title 42 United States Code unless otherwise stated.
