mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 09:46:09 +02:00
Merge branch 'master' of github.com:domify/registry
This commit is contained in:
commit
28fe91ebeb
12 changed files with 82 additions and 55 deletions
|
@ -45,6 +45,17 @@ class Registrant::SessionsController < ::SessionsController
|
|||
# rubocop:enable Metrics/CyclomaticComplexity
|
||||
# rubocop:enable Metrics/PerceivedComplexity
|
||||
|
||||
def id
|
||||
@user = RegistrantUser.find_or_create_by_idc_data(request.env['SSL_CLIENT_S_DN'])
|
||||
if @user
|
||||
sign_in(@user, event: :authentication)
|
||||
redirect_to registrant_root_url
|
||||
else
|
||||
flash[:alert] = t('login_failed_check_id_card')
|
||||
redirect_to registrant_login_url
|
||||
end
|
||||
end
|
||||
|
||||
def login_mid
|
||||
@user = User.new
|
||||
end
|
||||
|
@ -55,7 +66,7 @@ class Registrant::SessionsController < ::SessionsController
|
|||
|
||||
if Rails.env.test? && phone == "123"
|
||||
@user = ApiUser.find_by(identity_code: "14212128025")
|
||||
sign_in(@user, event: :authentication)
|
||||
sign_in(@user, event: :authentication)
|
||||
return redirect_to registrant_root_url
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue