diff options
author | Francisco Lopez <fjlopez@gitlab.com> | 2017-11-08 19:41:07 +0100 |
---|---|---|
committer | Francisco Lopez <fjlopez@gitlab.com> | 2017-11-17 10:02:10 +0100 |
commit | aecc3eb0809c4436a57f5ecdd88def58e704205d (patch) | |
tree | 227905f3f9013fdbc1040c54fc303f4dbbc2d47c /lib/gitlab/auth/request_authenticator.rb | |
parent | 374179a97042da3a4d5312afcdb0dc90a44634f0 (diff) | |
download | gitlab-ce-aecc3eb0809c4436a57f5ecdd88def58e704205d.tar.gz |
Applied some code review comments
Diffstat (limited to 'lib/gitlab/auth/request_authenticator.rb')
-rw-r--r-- | lib/gitlab/auth/request_authenticator.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/gitlab/auth/request_authenticator.rb b/lib/gitlab/auth/request_authenticator.rb index eb16701bad5..1490136ee4f 100644 --- a/lib/gitlab/auth/request_authenticator.rb +++ b/lib/gitlab/auth/request_authenticator.rb @@ -7,8 +7,10 @@ module Gitlab attr_reader :request + delegate :params, :env, to: :request + def initialize(request) - @request = ensure_action_dispatch_request(request) + @request = request end def user @@ -16,7 +18,9 @@ module Gitlab end def find_sessionless_user - find_user_from_access_token || find_user_by_rss_token + find_user_from_access_token || find_user_from_rss_token + rescue StandardError + nil end end end |