Module: Impersonation

Includes:
Gitlab::Utils::StrongMemoize
Included in:
ApplicationController
Defined in:
app/controllers/concerns/impersonation.rb

Instance Method Summary collapse

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Instance Method Details

#current_userObject


6
7
8
9
10
11
12
# File 'app/controllers/concerns/impersonation.rb', line 6

def current_user
  user = super

  user.impersonator = impersonator if impersonator

  user
end