diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index ceeb8b9b..601ebb8a 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -135,7 +135,7 @@ class ApplicationController < ActionController::Base end def ec_public_auth major_school - unless User.current.admin? || major_school.template_major || major_school.school.users.where(:id => User.current.id).count > 0 || + unless admin_or_business? || major_school.template_major || major_school.school.users.where(:id => User.current.id).count > 0 || major_school.ec_major_school_users.where(:user_id => User.current.id).count > 0 || EcCourseUser.where(:user_id => User.current.id, :ec_course_id => EcCourse.where(:ec_year_id => major_school.ec_years.pluck(:id)).pluck(:id)).count > 0 render_403