|
|
@ -135,7 +135,7 @@ class ApplicationController < ActionController::Base
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def ec_public_auth major_school
|
|
|
|
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 ||
|
|
|
|
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
|
|
|
|
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
|
|
|
|
render_403
|
|
|
|