From fa446a7e00ad7ef0e0e577f65deef677910b5299 Mon Sep 17 00:00:00 2001 From: rsandell Date: Wed, 28 Feb 2024 12:06:33 +0100 Subject: [PATCH] SECURITY-3268 --- .../plugins/computeengine/AcceleratorConfiguration.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/google/jenkins/plugins/computeengine/AcceleratorConfiguration.java b/src/main/java/com/google/jenkins/plugins/computeengine/AcceleratorConfiguration.java index 7c2f5aa6..7296d46a 100644 --- a/src/main/java/com/google/jenkins/plugins/computeengine/AcceleratorConfiguration.java +++ b/src/main/java/com/google/jenkins/plugins/computeengine/AcceleratorConfiguration.java @@ -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; @@ -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);