mirror of
https://github.com/internetee/registry.git
synced 2025-07-13 14:35:05 +02:00
Test login to production env too
This commit is contained in:
parent
7963330aeb
commit
f837500e7a
2 changed files with 12 additions and 13 deletions
|
@ -1,13 +1,15 @@
|
|||
class SessionsController < Devise::SessionsController
|
||||
def create
|
||||
if Rails.env.development? || Rails.env.test?
|
||||
@user = User.find_by(username: 'gitlab') if params[:gitlab]
|
||||
@user = User.find_by(username: 'zone') if params[:zone]
|
||||
#TODO: Create ID Card login here:
|
||||
# this is just testing config
|
||||
# if Rails.env.development? || Rails.env.test?
|
||||
@user = User.find_by(username: 'gitlab') if params[:gitlab]
|
||||
@user = User.find_by(username: 'zone') if params[:zone]
|
||||
|
||||
flash[:notice] = I18n.t('shared.welcome')
|
||||
sign_in_and_redirect @user, :event => :authentication
|
||||
return
|
||||
end
|
||||
flash[:notice] = I18n.t('shared.welcome')
|
||||
sign_in_and_redirect @user, :event => :authentication
|
||||
return
|
||||
# end
|
||||
end
|
||||
|
||||
def login
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue