Follow-up from "Hide read_registry scope when registry is disabled on instance"
The following discussion from !13314 (merged) should be addressed:
-
@rymai started a discussion: (+3 comments)
I think we should:
Revert to
REGISTRY_SCOPES = [:read_registry].freeze
Create a new
Gitlab::Auth.registry_scopes
method:def registry_scopes return [] unless Gitlab.config.registry.enabled REGISTRY_SCOPES end
Replace
AVAILABLE_SCOPES
withGitlab::Auth.available_scopes
andOPTIONAL_SCOPES
withGitlab::Auth.optional_scopes