diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2017-06-30 07:32:25 +0000 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2017-06-30 07:32:25 +0000 |
commit | afbc7520c296196d0f3f95d4a24a9e42c0e41f3c (patch) | |
tree | b24fcb7fff29f362cfe1976bf4e12a5330d83cb9 /lib/gitlab/auth.rb | |
parent | b8ec1f4201c74c500e4f7010b238c7920599da7a (diff) | |
download | gitlab-ce-afbc7520c296196d0f3f95d4a24a9e42c0e41f3c.tar.gz |
`AccessTokenValidationService` accepts `String` or `API::Scope` scopes.
- There's no need to use `API::Scope` for scopes that don't have `if`
conditions, such as in `lib/gitlab/auth.rb`.
Diffstat (limited to 'lib/gitlab/auth.rb')
-rw-r--r-- | lib/gitlab/auth.rb | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/gitlab/auth.rb b/lib/gitlab/auth.rb index 6d0d638ba14..ccb5d886bab 100644 --- a/lib/gitlab/auth.rb +++ b/lib/gitlab/auth.rb @@ -140,7 +140,6 @@ module Gitlab end def valid_scoped_token?(token, scopes) - scopes = scopes.map { |scope| API::Scope.new(scope) } AccessTokenValidationService.new(token).include_any_scope?(scopes) end |