File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
main/java/com/cloudbees/jenkins/plugins/sshcredentials/impl
test/java/com/cloudbees/jenkins/plugins/sshcredentials/impl Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ public void userWithoutRunScripts_cannotMigrateDangerousPrivateKeySource() throw
9898 .withStdin (updateFolder .read ())
9999 .invokeWithArgs ("folder1" );
100100
101- assertThat (result .stderr (), containsString ("user is missing the Overall/RunScripts permission" ));
101+ assertThat (result .stderr (), containsString ("user is missing the Overall/Administer permission" ));
102102 assertThat (result , failedWith (1 ));
103103
104104 // config file not touched
You can’t perform that action at this time.
0 commit comments