fix business not permission at ec major school show

dev_trainings
p31729568 6 years ago
parent 567bcfdf65
commit 0814e7b412

@ -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

Loading…
Cancel
Save