diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2018-04-04 18:43:41 -0500 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2018-04-06 21:20:16 -0500 |
commit | 171b2625b128e5954ce0a150a4fc923a22164e4e (patch) | |
tree | 834586c27477a404e71fe2fac9d17ecf3e495e58 /lib | |
parent | 7deab3172257bef7818ce834c1e0709432ddd5e0 (diff) | |
download | gitlab-ce-171b2625b128e5954ce0a150a4fc923a22164e4e.tar.gz |
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.rb | 4 |
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| |