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:
authorLin Jen-Shin <godfat@godfat.org>2017-11-22 10:50:36 +0300
committerLin Jen-Shin <godfat@godfat.org>2017-11-22 12:06:57 +0300
commit07d3d44775f6cc5b7a1b768cb4e5b7900d543815 (patch)
tree9b87200493dfc56a64aa6716ff4f03794b8f24c3 /lib/api/helpers.rb
parent15edf741a14a53443fb39ecb59888e75697b9c2b (diff)
Move ModuleWithInstanceVariables to Gitlab namespace
And use .rubocop.yml to exclude paths we don't care, rather than using the cop itself to exclude.
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index c4f81443282..fc1a3948bb4 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -32,7 +32,7 @@ module API
end
end
- # rubocop:disable Cop/ModuleWithInstanceVariables
+ # rubocop:disable Gitlab/ModuleWithInstanceVariables
# We can't rewrite this with StrongMemoize because `sudo!` would
# actually write to `@current_user`, and `sudo?` would immediately
# call `current_user` again which reads from `@current_user`.
@@ -50,7 +50,7 @@ module API
@current_user
end
- # rubocop:enable Cop/ModuleWithInstanceVariables
+ # rubocop:enable Gitlab/ModuleWithInstanceVariables
def sudo?
initial_current_user != current_user
@@ -399,7 +399,7 @@ module API
private
- # rubocop:disable Cop/ModuleWithInstanceVariables
+ # rubocop:disable Gitlab/ModuleWithInstanceVariables
def initial_current_user
return @initial_current_user if defined?(@initial_current_user)
@@ -409,7 +409,7 @@ module API
unauthorized!
end
end
- # rubocop:enable Cop/ModuleWithInstanceVariables
+ # rubocop:enable Gitlab/ModuleWithInstanceVariables
def sudo!
return unless sudo_identifier
@@ -429,7 +429,7 @@ module API
sudoed_user = find_user(sudo_identifier)
not_found!("User with ID or username '#{sudo_identifier}'") unless sudoed_user
- @current_user = sudoed_user # rubocop:disable Cop/ModuleWithInstanceVariables
+ @current_user = sudoed_user # rubocop:disable Gitlab/ModuleWithInstanceVariables
end
def sudo_identifier