Skip to content

Commit

Permalink
SECURITY-3268
Browse files Browse the repository at this point in the history
  • Loading branch information
rsandell authored and raul-arabaolaza committed Feb 28, 2024
1 parent 5ed247b commit fa446a7
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package com.google.jenkins.plugins.computeengine;

import static com.google.jenkins.plugins.computeengine.ComputeEngineCloud.checkPermissions;

import com.google.api.services.compute.model.AcceleratorType;
import com.google.cloud.graphite.platforms.plugin.client.ClientFactory;
import com.google.cloud.graphite.platforms.plugin.client.ComputeClient;
Expand Down Expand Up @@ -81,6 +83,7 @@ public ListBoxModel doFillGpuTypeItems(
@QueryParameter("projectId") @RelativePath("../..") final String projectId,
@QueryParameter("zone") @RelativePath("..") String zone,
@QueryParameter("credentialsId") @RelativePath("../..") final String credentialsId) {
checkPermissions(Jenkins.get(), Jenkins.ADMINISTER);
ListBoxModel items = new ListBoxModel();
try {
ComputeClient compute = computeClient(context, credentialsId);
Expand Down

0 comments on commit fa446a7

Please sign in to comment.