From 62ef67acc3a8d260aa3e641b350aaecf8d60f1aa Mon Sep 17 00:00:00 2001 From: Robin Bobbitt Date: Fri, 4 Aug 2017 09:17:20 -0400 Subject: Hide read_registry scope when registry is disabled on instance --- lib/gitlab/auth.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/gitlab/auth.rb b/lib/gitlab/auth.rb index 7d3aa532750..0a5afeb5202 100644 --- a/lib/gitlab/auth.rb +++ b/lib/gitlab/auth.rb @@ -2,7 +2,7 @@ module Gitlab module Auth MissingPersonalTokenError = Class.new(StandardError) - REGISTRY_SCOPES = [:read_registry].freeze + REGISTRY_SCOPES = Gitlab.config.registry.enabled ? [:read_registry].freeze : [].freeze # Scopes used for GitLab API access API_SCOPES = [:api, :read_user].freeze -- cgit v1.2.1