mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 20:18:22 +02:00
Switch user in registrar #2754
This commit is contained in:
parent
0c4e152abd
commit
0a0543c715
5 changed files with 32 additions and 2 deletions
|
@ -64,6 +64,12 @@ class Registrar::SessionsController < Devise::SessionsController
|
|||
# rubocop:enable Metrics/MethodLength
|
||||
# rubocop:enable Metrics/AbcSize
|
||||
|
||||
def switch_user
|
||||
@api_user = ApiUser.find(params[:id])
|
||||
sign_in @api_user if @api_user.identity_code == current_user.identity_code
|
||||
redirect_to :back
|
||||
end
|
||||
|
||||
def id
|
||||
@user = ApiUser.find_by_idc_data(request.env['SSL_CLIENT_S_DN'])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue