Skip to content

Commit e35d0ba

Browse files
authored
replace RUN_SCRIPTS with ADMINISTER
replace RUN_SCRIPTS with ADMINISTER RUN SCripts is deprecated and realms don;t grant it on its own without ADMINISTER as it really is ADMINISTER. Just check ADMINISTER
1 parent b030909 commit e35d0ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/cloudbees/jenkins/plugins/sshcredentials/impl/BasicSSHUserPrivateKey.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ private Object readResolve() {
443443
return new DirectEntryPrivateKeySource(privateKeyFile);
444444
}
445445

446-
Jenkins.get().checkPermission(Jenkins.RUN_SCRIPTS);
446+
Jenkins.get().checkPermission(Jenkins.ADMINISTER);
447447

448448
LOGGER.log(Level.INFO, "SECURITY-440: Migrating FileOnMasterPrivateKeySource to DirectEntryPrivateKeySource");
449449
// read the content of the file and then migrate to Direct
@@ -530,7 +530,7 @@ public long getPrivateKeysLastModified() {
530530
}
531531

532532
private Object readResolve() {
533-
Jenkins.get().checkPermission(Jenkins.RUN_SCRIPTS);
533+
Jenkins.get().checkPermission(Jenkins.ADMINISTER);
534534

535535
LOGGER.log(Level.INFO, "SECURITY-440: Migrating UsersPrivateKeySource to DirectEntryPrivateKeySource");
536536
// read the content of the file and then migrate to Direct

0 commit comments

Comments
 (0)