Sha256: 89a1232320e1ebbe797e9a68defee5d8c530d2b3f49f2b261989424cb7fea0a6

Contents?: true

Size: 638 Bytes

Versions: 2

Compression:

Stored size: 638 Bytes

Contents

# frozen_string_literal: true
require_dependency "think_feel_do_engine/application_controller"

module ThinkFeelDoEngine
  # Used ONLY in development to speed up manual logins.
  class QuickSignInsController < ApplicationController
    skip_authorization_check

    def new
      if params[:user_id]
        resource = User.where(id: params[:user_id]).first
      elsif params[:participant_id]
        ParticipantLoginEvent.create(participant_id: params[:participant_id])
        resource = Participant.where(id: params[:participant_id]).first
      end
      if resource
        sign_in_and_redirect resource
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
think_feel_do_engine-3.21.0 app/controllers/think_feel_do_engine/quick_sign_ins_controller.rb
think_feel_do_engine-3.20.1 app/controllers/think_feel_do_engine/quick_sign_ins_controller.rb