summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/api/helpers/authentication.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/helpers/authentication.rb b/lib/api/helpers/authentication.rb
index e1d7ac83ff6..666bf3ffa16 100644
--- a/lib/api/helpers/authentication.rb
+++ b/lib/api/helpers/authentication.rb
@@ -15,7 +15,7 @@ module API
def find_user_by_personal_access_token
personal_access_token_string = (params[PERSONAL_ACCESS_TOKEN_PARAM] || env[PERSONAL_ACCESS_TOKEN_HEADER]).to_s
- personal_access_token = PersonalAccessToken.find_by_token(personal_access_token_string)
+ personal_access_token = PersonalAccessToken.active.find_by_token(personal_access_token_string)
personal_access_token.user if personal_access_token
end