Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2017-06-30 10:32:25 +0300
committerTimothy Andrew <mail@timothyandrew.net>2017-06-30 10:32:25 +0300
commitafbc7520c296196d0f3f95d4a24a9e42c0e41f3c (patch)
treeb24fcb7fff29f362cfe1976bf4e12a5330d83cb9 /lib/api/scope.rb
parentb8ec1f4201c74c500e4f7010b238c7920599da7a (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.rb2
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