Skip to content
This repository has been archived by the owner on Aug 3, 2019. It is now read-only.

Commit

Permalink
Merge pull request #2 from baymac/feature/upgrade-api
Browse files Browse the repository at this point in the history
[JENKINS-57850] Feature/upgrade api
  • Loading branch information
baymac committed Jun 5, 2019
2 parents 9bf6d8a + 5feb157 commit 418940a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -39,7 +39,7 @@
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>gitlab-api</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
Expand Down
Expand Up @@ -258,7 +258,7 @@ public ListBoxModel doFillCredentialsIdItems(@QueryParameter String serverUrl, @
if(!Jenkins.getInstance().hasPermission(Jenkins.ADMINISTER)) {
return new StandardListBoxModel().includeCurrentValue(credentialsId);
}
return new StandardListBoxModel()
return new StandardListBoxModel()
.includeEmptyValue()
.includeMatchingAs(ACL.SYSTEM,
Jenkins.getInstance(),
Expand Down
Expand Up @@ -51,9 +51,11 @@ public class GitLabPersonalAccessTokenCreator extends Descriptor<GitLabPersonalA

private static final Logger LOGGER = LoggerFactory.getLogger(GitLabPersonalAccessTokenCreator.class);

private static final List<String> GL_PLUGIN_REQUIRED_SCOPE = ImmutableList.of(
Constants.ApplicationScope.API.toValue(),
Constants.ApplicationScope.READ_USER.toValue()
private static final List<AccessTokenUtils.Scope> GL_PLUGIN_REQUIRED_SCOPE = ImmutableList.of(
AccessTokenUtils.Scope.API,
AccessTokenUtils.Scope.READ_REGISTRY,
AccessTokenUtils.Scope.READ_USER,
AccessTokenUtils.Scope.READ_REPOSITORY
);

public GitLabPersonalAccessTokenCreator() {
Expand Down

0 comments on commit 418940a

Please sign in to comment.