From 02283fe4979ad055a20131166628a32b3c152897 Mon Sep 17 00:00:00 2001 From: IN COMMON Collective Date: Fri, 26 Mar 2021 15:24:16 +0100 Subject: [DEV] WIP: explore sso login alternative --- app/controllers/application_controller.rb | 1 + app/controllers/welcome_controller.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'app/controllers') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 1eff1a9..25700af 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -4,6 +4,7 @@ class ApplicationController < ActionController::Base require 'sso' + SSO::FromDiscourse.config = Rails.configuration.sso before_action :current_user diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index ad9cd95..d5f5fe9 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -6,7 +6,7 @@ class WelcomeController < ApplicationController # GET / def index @map = Map.first - @taxonomy = @map.taxonomy + @taxonomy = @map&.taxonomy @resources = Resource.order(:uuid).page params[:page] Rails.logger.info "WECLOME ///// #{@resources&.count || 0}" end -- cgit v1.2.3