diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2017-06-30 10:32:25 +0300 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2017-06-30 10:32:25 +0300 |
commit | afbc7520c296196d0f3f95d4a24a9e42c0e41f3c (patch) | |
tree | b24fcb7fff29f362cfe1976bf4e12a5330d83cb9 /lib/api/scope.rb | |
parent | b8ec1f4201c74c500e4f7010b238c7920599da7a (diff) |
`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/api/scope.rb')
-rw-r--r-- | lib/api/scope.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/scope.rb b/lib/api/scope.rb index c23846d1e7d..d5165b2e482 100644 --- a/lib/api/scope.rb +++ b/lib/api/scope.rb @@ -11,7 +11,7 @@ module API # Are the `scopes` passed in sufficient to adequately authorize the passed # request for the scope represented by the current instance of this class? def sufficient?(scopes, request) - verify_if_condition(request) && scopes.include?(self.name) + scopes.include?(self.name) && verify_if_condition(request) end private |