diff options
author | Robin Bobbitt <ryehle@us.ibm.com> | 2017-08-04 16:17:20 +0300 |
---|---|---|
committer | Robin Bobbitt <ryehle@us.ibm.com> | 2017-08-22 01:13:32 +0300 |
commit | 62ef67acc3a8d260aa3e641b350aaecf8d60f1aa (patch) | |
tree | 9d120306e3a551f85e7ab0ac2efbbf1684899139 /app/models/personal_access_token.rb | |
parent | e6d87021f31839395fdbdedc36613a57fb771375 (diff) |
Hide read_registry scope when registry is disabled on instance
Diffstat (limited to 'app/models/personal_access_token.rb')
-rw-r--r-- | app/models/personal_access_token.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/personal_access_token.rb b/app/models/personal_access_token.rb index 654be927ed8..ec0ebe4d353 100644 --- a/app/models/personal_access_token.rb +++ b/app/models/personal_access_token.rb @@ -28,7 +28,7 @@ class PersonalAccessToken < ActiveRecord::Base protected def validate_scopes - unless scopes.all? { |scope| Gitlab::Auth::AVAILABLE_SCOPES.include?(scope.to_sym) } + unless revoked || scopes.all? { |scope| Gitlab::Auth::AVAILABLE_SCOPES.include?(scope.to_sym) } errors.add :scopes, "can only contain available scopes" end end |