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
path: root/lib
diff options
context:
space:
mode:
authorMayra Cabrera <mcabrera@gitlab.com>2018-04-05 02:43:41 +0300
committerMayra Cabrera <mcabrera@gitlab.com>2018-04-07 05:20:16 +0300
commit171b2625b128e5954ce0a150a4fc923a22164e4e (patch)
tree834586c27477a404e71fe2fac9d17ecf3e495e58 /lib
parent7deab3172257bef7818ce834c1e0709432ddd5e0 (diff)
Addreses backend review suggestions
- Remove extra method for authorize_admin_project - Ensure project presence - Rename 'read_repo' to 'read_repository' to be more verbose
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/auth.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/auth.rb b/lib/gitlab/auth.rb
index 3ef2f7f2967..35458f607c6 100644
--- a/lib/gitlab/auth.rb
+++ b/lib/gitlab/auth.rb
@@ -5,7 +5,7 @@ module Gitlab
REGISTRY_SCOPES = [:read_registry].freeze
# Scopes used for GitLab API access
- API_SCOPES = [:api, :read_user, :sudo, :read_repo].freeze
+ API_SCOPES = [:api, :read_user, :sudo, :read_repository].freeze
# Scopes used for OpenID Connect
OPENID_SCOPES = [:openid].freeze
@@ -165,7 +165,7 @@ module Gitlab
abilities_by_scope = {
api: full_authentication_abilities,
read_registry: build_authentication_abilities - [:build_create_container_image],
- read_repo: read_authentication_abilities - [:read_container_image]
+ read_repository: read_authentication_abilities - [:read_container_image]
}
scopes.flat_map do |scope|