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