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:
Diffstat (limited to 'lib/gitlab/auth/auth_finders.rb')
-rw-r--r--lib/gitlab/auth/auth_finders.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/auth/auth_finders.rb b/lib/gitlab/auth/auth_finders.rb
index 966520655a5..a715f17ecd6 100644
--- a/lib/gitlab/auth/auth_finders.rb
+++ b/lib/gitlab/auth/auth_finders.rb
@@ -403,10 +403,14 @@ module Gitlab
end
def revoke_token_family(token)
- return unless Feature.enabled?(:pat_reuse_detection)
+ return unless access_token_rotation_request?
PersonalAccessTokens::RevokeTokenFamilyService.new(token).execute
end
+
+ def access_token_rotation_request?
+ current_request.path.match(%r{access_tokens/\d+/rotate$})
+ end
end
end
end