File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/test/java/hudson/tasks Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 4848import org .jenkinsci .plugins .workflow .cps .CpsFlowDefinition ;
4949import org .jenkinsci .plugins .workflow .job .WorkflowJob ;
5050import org .jenkinsci .plugins .workflow .job .WorkflowRun ;
51+ import org .junit .jupiter .api .BeforeAll ;
5152import org .junit .jupiter .api .Test ;
5253import org .jvnet .hudson .test .Email ;
5354import org .jvnet .hudson .test .FailureBuilder ;
@@ -104,6 +105,12 @@ private static Mailbox getMailbox(String recipient) throws Exception {
104105 return Mailbox .get (new InternetAddress (recipient ));
105106 }
106107
108+ @ BeforeAll
109+ static void enableManagePermission () {
110+ // TODO remove when baseline contains https://github.com/jenkinsci/jenkins/pull/23873
111+ Jenkins .MANAGE .setEnabled (true );
112+ }
113+
107114 private static Mailbox getEmptyMailbox (String recipient ) throws Exception {
108115 Mailbox inbox = getMailbox (recipient );
109116 inbox .clear ();
@@ -501,7 +508,7 @@ void doCheckSmtpServerShouldThrowExceptionForUserWithoutManagePermissions(Jenkin
501508 rule .jenkins .setAuthorizationStrategy (new MockAuthorizationStrategy ()
502509 .grant (Jenkins .READ ).everywhere ().to (USER )
503510 );
504- final String expectedErrorMessage = "user is missing the Overall/Administer permission" ;
511+ final String expectedErrorMessage = "user is missing the Overall/Manage permission" ;
505512
506513 try (ACLContext ignored = ACL .as (User .getById (USER , true ))) {
507514 RuntimeException runtimeException = assertThrows (RuntimeException .class ,
You can’t perform that action at this time.
0 commit comments