2015-03-25 17:49:37 +01:00
|
|
|
class WelcomeController < ApplicationController
|
2015-09-22 07:13:35 +02:00
|
|
|
skip_before_filter :verify_authenticity_token, only: :token_sign_in
|
2015-08-31 14:33:15 +02:00
|
|
|
|
2015-03-25 17:49:37 +01:00
|
|
|
def index
|
|
|
|
end
|
2015-09-22 07:13:35 +02:00
|
|
|
|
|
|
|
def token_sign_in
|
2015-10-07 15:10:14 +02:00
|
|
|
if user_signed_in? || params[:token] != Rails.application.secrets.koelkast_token
|
2015-10-07 15:06:01 +02:00
|
|
|
redirect_to root_path
|
|
|
|
return
|
|
|
|
end
|
2015-12-31 17:30:57 +01:00
|
|
|
|
|
|
|
koelkast = User.koelkast
|
|
|
|
sign_in_and_redirect koelkast
|
2015-09-22 07:13:35 +02:00
|
|
|
end
|
2015-03-25 17:49:37 +01:00
|
|
|
end
|