diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-04-15 20:54:20 +0530 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-04-28 22:28:36 +0530 |
commit | 6d76f14f54eb1af0e5c29eff1b8f5e70d2264ffd (patch) | |
tree | 070356b310ca52d57c18b43295218455cddd1d0c /lib/api/helpers/authentication.rb | |
parent | e2a4051cc3f4192849d7571bf83b0d9a7b2cbd4e (diff) | |
download | gitlab-ce-6d76f14f54eb1af0e5c29eff1b8f5e70d2264ffd.tar.gz |
Allow revoking personal access tokens.
Diffstat (limited to 'lib/api/helpers/authentication.rb')
-rw-r--r-- | lib/api/helpers/authentication.rb | 2 |
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 |