mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-28 12:05:19 +00:00
[FIX JENKINS-34094] Add access control
Also adds some API restrictions for JENKINS-33803.
This commit is contained in:
1 parent
1891deee30
commit
6f8540c347
7 files changed
+23
-2
No files matched your search
@@ -656,6 +656,7 @@ public class PluginWrapper implements Comparable<PluginWrapper>, ModelObject {
|
||||
@RequirePOST
|
||||
@Deprecated
|
||||
public HttpResponse doPin() throws IOException {
|
||||
Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER);
|
||||
// See https://groups.google.com/d/msg/jenkinsci-dev/kRobm-cxFw8/6V66uhibAwAJ
|
||||
LOGGER.log(WARNING, "Call to pin plugin has been ignored. Plugin name: " + shortName);
|
||||
return HttpResponses.ok();
|
||||
@@ -664,6 +665,7 @@ public class PluginWrapper implements Comparable<PluginWrapper>, ModelObject {
|
||||
@RequirePOST
|
||||
@Deprecated
|
||||
public HttpResponse doUnpin() throws IOException {
|
||||
Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER);
|
||||
// See https://groups.google.com/d/msg/jenkinsci-dev/kRobm-cxFw8/6V66uhibAwAJ
|
||||
LOGGER.log(WARNING, "Call to unpin plugin has been ignored. Plugin name: " + shortName);
|
||||
return HttpResponses.ok();
|
||||
|
||||
Reference in new issue
Block a user