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

[JENKINS-57850] Feature/upgrade api #2

Merged
merged 3 commits into from Jun 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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