Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-08 15:09:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-08 15:09:42 +0300
commit403678e00406edc8094f087ec70e00aa29e49bef (patch)
tree447d6d4967e9a11895683b27e637a50bd9fc0602 /lib/gitlab/auth.rb
parentf5050253469fc0961c02deec0e698ad62bdd9de5 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/auth.rb')
-rw-r--r--lib/gitlab/auth.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/auth.rb b/lib/gitlab/auth.rb
index 8a68808d9fd..c489c835d9d 100644
--- a/lib/gitlab/auth.rb
+++ b/lib/gitlab/auth.rb
@@ -6,7 +6,7 @@ module Gitlab
IpBlacklisted = Class.new(StandardError)
# Scopes used for GitLab API access
- API_SCOPES = [:api, :read_user].freeze
+ API_SCOPES = [:api, :read_user, :read_api].freeze
# Scopes used for GitLab Repository access
REPOSITORY_SCOPES = [:read_repository, :write_repository].freeze
@@ -198,6 +198,7 @@ module Gitlab
def abilities_for_scopes(scopes)
abilities_by_scope = {
api: full_authentication_abilities,
+ read_api: read_only_authentication_abilities,
read_registry: [:read_container_image],
read_repository: [:download_code],
write_repository: [:download_code, :push_code]