diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-09-18 20:25:23 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-09-18 20:29:32 +0300 |
commit | 6a4ee9aa7140862075cafae1ddebd133eec52b5b (patch) | |
tree | 9890bb5c906a0d6e207149ae5fe1df84d213fa7c /lib/api/helpers.rb | |
parent | 9ae92b8caa6c11d8860f86b7d6378062215d1b72 (diff) |
Allow simple ivar ||= form. Update accordingly
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r-- | lib/api/helpers.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 49e659d3d27..abbe2e9ba3e 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -1,4 +1,3 @@ -# rubocop:disable Cop/ModuleWithInstanceVariables module API module Helpers include Gitlab::Utils @@ -33,6 +32,7 @@ module API end end + # rubocop:disable Cop/ModuleWithInstanceVariables def current_user return @current_user if defined?(@current_user) @@ -396,6 +396,7 @@ module API warden.try(:authenticate) if verified_request? end + # rubocop:disable Cop/ModuleWithInstanceVariables def initial_current_user return @initial_current_user if defined?(@initial_current_user) Gitlab::Auth::UniqueIpsLimiter.limit_user! do @@ -411,6 +412,7 @@ module API end end + # rubocop:disable Cop/ModuleWithInstanceVariables def sudo! return unless sudo_identifier return unless initial_current_user |