File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/main/java/io/jenkins/plugins/gitlabserverconfig/servers Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 77import com .cloudbees .plugins .credentials .SystemCredentialsProvider ;
88import com .cloudbees .plugins .credentials .common .StandardCredentials ;
99import com .cloudbees .plugins .credentials .common .StandardListBoxModel ;
10+ import com .cloudbees .plugins .credentials .domains .DomainRequirement ;
1011import edu .umd .cs .findbugs .annotations .CheckForNull ;
1112import edu .umd .cs .findbugs .annotations .NonNull ;
1213import hudson .Extension ;
2425import java .net .MalformedURLException ;
2526import java .net .URL ;
2627import java .security .SecureRandom ;
28+ import java .util .ArrayList ;
2729import java .util .Collections ;
2830import java .util .List ;
2931import java .util .logging .Level ;
@@ -374,9 +376,12 @@ public Secret getSecretToken() {
374376
375377 private StringCredentials getWebhookSecretCredentials (String webhookSecretCredentialsId ) {
376378 Jenkins jenkins = Jenkins .get ();
377- jenkins .checkPermission (Jenkins .ADMINISTER );
378- return StringUtils .isBlank (webhookSecretCredentialsId ) ? null : CredentialsMatchers .firstOrNull (
379- lookupCredentials (StringCredentials .class , jenkins ),
379+ return StringUtils .isBlank (webhookSecretCredentialsId ) ? null
380+ : CredentialsMatchers .firstOrNull (lookupCredentials (
381+ StringCredentials .class ,
382+ jenkins ,
383+ ACL .SYSTEM ,
384+ new ArrayList <DomainRequirement >()),
380385 withId (webhookSecretCredentialsId )
381386 );
382387 }
You can’t perform that action at this time.
0 commit comments