summaryrefslogtreecommitdiff
path: root/app/controllers/admin/impersonations_controller.rb
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2019-06-28 14:28:29 +0200
committerToon Claes <toon@gitlab.com>2019-06-28 14:28:29 +0200
commit288b050e5b226e403f9c88c3fe16fb4279714d69 (patch)
tree9b3f96b71cab616d44000c192ab5870098ee6c5f /app/controllers/admin/impersonations_controller.rb
parent046527beb585b8086e8b280dee78f43417b9a753 (diff)
downloadgitlab-ce-288b050e5b226e403f9c88c3fe16fb4279714d69.tar.gz
Enable Style/SafeNavigation coptc-no-more-try
I ran `rubocop -a --only Style/SafeNavigation` to correct all. I could not enable `ConvertTry` cause it does not seem to be supported by the version we're using. https://gitlab.com/gitlab-org/gitlab-ce/issues/63875
Diffstat (limited to 'app/controllers/admin/impersonations_controller.rb')
-rw-r--r--app/controllers/admin/impersonations_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/admin/impersonations_controller.rb b/app/controllers/admin/impersonations_controller.rb
index 65fe22bd8f4..f0e160258f8 100644
--- a/app/controllers/admin/impersonations_controller.rb
+++ b/app/controllers/admin/impersonations_controller.rb
@@ -12,6 +12,6 @@ class Admin::ImpersonationsController < Admin::ApplicationController
private
def authenticate_impersonator!
- render_404 unless impersonator && impersonator.admin? && !impersonator.blocked?
+ render_404 unless impersonator&.admin? && !impersonator.blocked?
end
end