
315 So.2d 878 (1975)
Roy Donald GUILLORY, Plaintiff-Appellant,
v.
NICKLOS OIL & GAS COMPANY et al., Defendants-Appellees.
No. 5067.
Court of Appeal of Louisiana, Third Circuit.
July 3, 1975.
*880 Pucheu & Pucheu, by Jacque B. Pucheu, Eunice, for plaintiff-appellant.
Davidson, Meaux, Onebane & Donohoe by Lawrence L. Lewis, III, Lafayette, for intervenor-appellee.
Allen, Gooch & Bourgeois, by Joel E. Gooch, Lafayette, for defendants-appellees.
Before FRUGE, MILLER and DOMENGEAUX, JJ.
FRUGE, Judge.
This is an appeal by plaintiff and intervenor from a judgment sustaining a peremptory exception of no right or cause of action filed by Nicklos Oil & Gas Company.
The plaintiff, Roy D. Guillory, an employee of Slick Construction Co., Inc., alleges that on October 10, 1972, while operating a bulldozer with a back hoe in Acadia Parish he was injured when a tooth of the back hoe caught a collar of a gas pipeline, causing the pipeline to rupture. Fearing an explosion, plaintiff jumped from the dozer and in so doing sustained an injury to his left knee and leg.
At time of the injury Slick Construction Company was employed by Nicklos Oil & Gas Company to dig a ditch into which Nicklos' pipeline was to be laid. Plaintiff sued Nicklos and several other defendants alleging liability through negligence or through strict liability.
An intervention was filed by Liberty Mutual Insurance Company who is the workmen's compensation insurer for Slick Construction Company. Liberty Mutual contends that it has paid $8,215.11 in workmen's compensation benefits to plaintiff and is entitled to that amount (and any other amount to be paid) in preference to plaintiff.
In response to plaintiff's petition Nicklos Gas & Oil Company filed an exception of no right and/or cause of action, a motion for summary judgment, and an answer.
In support of its exception and motion Nicklos urged that under R.S. 23:1061 of the workmen's compensation statute it is the statutory employer of the plaintiff, and that under R.S. 23:1032 plaintiff has no remedy in tort against Nicklos. The trial court sustained the exception of no right *881 and/or cause of action but denied the motion for summary judgment. Plaintiff and intervenor have appealed from the judgment sustained the exception.[1] We reverse.
THE PEREMPTORY EXCEPTION OF NO CAUSE OF ACTION
The peremptory exception of no cause of action C.C.P. art. 927(4) questions whether the law affords any remedy to the plaintiff under the allegations of his petition. No evidence may be introduced to support or controvert an objection that the petition fails to state a cause of action. C.C.P. art. 931. American Creosote Company v. Springer, 257 La. 116, 241 So.2d 510 (1970). The exception is triable solely on the face of the petition. All well pleaded facts in the petition and attached documents must be accepted as true and any doubts must be resolved in favor of the sufficiency of the pleading to state a cause of action. The exception must be overruled unless the allegations affirmatively establish that under no facts admissible under the allegations of the petition does plaintiff have a cause of action. See Hero Lands Company v. Texaco, Inc., 310 So.2d 93 (La.1975); Watkins v. Louisiana High School Athletic Ass'n., 301 So.2d 695 (La.App. 3rd Cir. 1974).
Plaintiff's petition alleges that he was employed by Slick Construction to operate the dozer and that at the time of the accident "he was working on or near the property of the Raymond McManus Estate in the Richie Area of Acadia Parish, Louisiana, petitioner's employer having been employed by Nicklos Oil & Gas Company to dig the ditch and place said defendant's pipeline therein."
The petition alleges that certain employees of Nicklos were directing the operation of laying the pipe and that their negligence caused the accident. It is also alleged that "at the time of the accident `Nicklos' was the mineral lessee of the land on which petitioner was employed to work, was the producer of the oil or mineral wells thereon and was the owner and operator of the pipeline."
The petition alleges that Nicklos and the other defendants were negligent for "failing to cut off or discontinue the gas flow into the pipeline prior to allowing work in the area"; "in failing to warn petitioner that there was gas pressure in said line"; for "failing to adequately inspect or maintain the pipeline . . .", and several other alleged acts of negligence not pertinent to the outcome of this appeal. The petition specifically alleges Nicklos to be negligent for failure to provide a safe place to work.
Plaintiff also filed an amended petition naming Nicklos' insurer as an additional defendant. A second amended petition was filed subsequent to the judgment sustaining the exception; we will not consider this second amending petition as it was not before the trial judge at the time the judgment was rendered.
La.R.S. 23:1061 provides as follows:
"Where any person (in this section referred to as principal) undertakes to execute any work, which is a part of his trade, business, or occupation or which he had contracted to perform, and contracts with any person (in this section referred to as contractor) for the execution by or under the contractor of the whole or any part of the work undertaken by the principal, the principal shall be liable to pay to any employee employed in the execution of the work or to his dependent, any compensation under this Chapter which he would have *882 been liable to pay if the employee had been immediately employed by him; and where compensation is claimed from, or proceedings are taken against, the principal, then, in the application of this Chapter reference to the principal shall be substituted for reference to the employer, except that the amount of compensation shall be calculated with reference to the earnings of the employee under the employer by whom he is immediately employed.
Where the principal is liable to pay compensation under this Section, he shall be entitled to indemnity from any person who independently of this Section would have been liable to pay compensation to the employee or his dependent, and shall have a cause of action therefor."
Plaintiff has pleaded that at the time of injury Slick was employed by Nicklos to dig a pipeline ditch and that Nicklos owned and operated the pipeline. According to appellee these pleadings establish that the work undertaken by Slick was part of the trade, business or occupation of Nicklos and the plaintiff therefore "has no cause of action in delict against (Nicklos) because his excusive remedy, if any, is under the Louisiana Workmen's Compensation Act."
We do not agree with appellee that plaintiff's petition establishes as fact that Nicklos is his statutory employer under R.S. 23:1061. The only allegation concerning Nicklos' trade, business or occupation is that Nicklos owned and operated the pipeline in question. There is no allegation in the petition that digging a pipeline ditch, for which Slick was employed, was part of the trade, business or occupation of Nicklos. The construction of a facility is not necessarily the trade or business or occupation of the operator of that facility. Hudson v. Aetna Casualty Insurance Company, 299 So.2d 499 (La.App. 4th Cir. 1974); Moak v. Link-Belt Co., 229 So.2d 395 (La.App. 4th Cir. 1969).
Plaintiff has alleged that he was injured due to a delict on the part of the defendant Nicklos. This states a cause of action against Nicklos. The question of whether Nicklos is plaintiff's statutory employer under R.S. 23:1061 is not established as fact by the allegations of plaintiff's petition. The parties must litigate this matter on the merits.
THE PEREMPTORY EXCEPTION OF NO RIGHT OF ACTION
The function of the peremptory exception of no right of action is to provide a threshold device for terminating a suit brought by one without the legal capacity to file it or without the legal interest to assert it. Watkins v. Louisiana High School Athletic Ass'n., supra. In this case, there is no question that plaintiff Guillory has the legal capacity to sue. The only question is whether plaintiff has a sufficient legal interest in the subject matter of the present litigation, i.e., whether he has a legal interest in the cause of action herein asserted.
Appellee asserts that plaintiff has no legal interest in the subject matter of this litigation because his exclusive remedy against Nicklos is in workmen's compensation.
We find this argument to be without merit. We have found that the plaintiff Guillory has asserted in his petition a cause of action in tort. The only question is whether Guillory is the proper party to assert that cause of action. We find that he is, for it is clear that he has a legal interest in a cause of action based upon his own injury. The exception of no right of action is not available to urge a defense to the effect that plaintiff is without interest simply because defendants have a defense to the action. Alside Supply Company v. Ramsey, 306 So.2d 762 (La.App. 4th Cir. 1975); Bielkiewicz v. Rudisill, 201 So.2d 136 (La.App. 3rd Cir. 1967).
*883 THE MOTION FOR SUMMARY JUDGMENT
Appellee suggests in brief that this court might prefer to consider the exclusive remedy defense on the motion for summary judgment rather than on the peremptory exception and cites: Spillers v. Northern Assurance Company of America, 254 So.2d 125 (La.App. 3rd Cir. 1971); Roloff v. Liberty Mutual Insurance Company, 191 So.2d 901 (La.App. 4th Cir. 1966).
We decline to consider the motion. Unlike in Spillers and Roloff where the motion had not been acted upon at the trial level, here the motion was denied. An appeal does not lie from the court's refusal to render a summary judgment. LSA-C.C.P. art. 968. Furthermore, defendant did not appeal or answer the appeal.
For the reasons assigned, the judgment of the trial court sustaining the exception of no right or cause of action is reversed. The case is remanded to the trial court for further proceedings in compliance with law.
Reversed and remanded.
NOTES
[1]  Nicklos Oil & Gas Company filed a motion to remand the case, contending that plaintiff's right to prosecute this appeal in forma pauperis should be traversed in the court below. The motion was denied by this court in a decision rendered June 10, 1975. See 315 So.2d 914 (La.App. 3rd Cir. 1975).
