From cfad9f7a7551be2af3d8a6957a4d2c49c9115d43 Mon Sep 17 00:00:00 2001 From: daiao <35855898@qq.com> Date: Thu, 14 Mar 2019 09:27:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E8=AF=BE=E7=A8=8B=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 7 +++++++ app/controllers/subjects_controller.rb | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 33d2e109..74424f31 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -75,6 +75,13 @@ class ApplicationController < ActionController::Base end end + # saas平台认证权限 + def saas_auth user=nil + logger.info("###################saas_auth:####{params}") + true + end + + def user_agent logger.info "HTTP_USER_AGENT #{request.env["HTTP_USER_AGENT"]}" end diff --git a/app/controllers/subjects_controller.rb b/app/controllers/subjects_controller.rb index 3191899c..f3ea9a98 100644 --- a/app/controllers/subjects_controller.rb +++ b/app/controllers/subjects_controller.rb @@ -4,7 +4,7 @@ class SubjectsController < ApplicationController before_filter :require_login, :except => [:show] before_filter :check_authentication, :except => [:show] before_filter :find_subject, :except => [:index, :new, :create, :create_subject, :new_subject, :append_to_stage, :send_to_course] - + before_filter :saas_auth, :only => [:index, :show] include ApplicationHelper include SubjectsHelper