mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
admin login now honors seed file
This commit is contained in:
parent
0ccc70fcf4
commit
0ef51a12c4
2 changed files with 10 additions and 4 deletions
|
@ -3,7 +3,10 @@ class SessionsController < Devise::SessionsController
|
|||
# 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.first if params[:user1]
|
||||
@user = User.second if params[:user2]
|
||||
|
||||
return redirect_to :back, alert: 'No user' if @user.blank?
|
||||
|
||||
session[:current_user_registrar_id] = Registrar.first.id if @user.admin?
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue