Merge branch 'dev_aliyun' into develop

dev_video
cxt 5 years ago
commit 26a586419a

@ -136,22 +136,16 @@ class CollegesController < ApplicationController
private private
def require_login
return if User.current.logged?
redirect_to "/login?back_url=#{CGI::escape(request.fullpath)}"
end
def check_college_present! def check_college_present!
return if current_college.present? return if current_college.present?
redirect_to '/404' tip_exception(404, "")
end end
def check_manage_permission! def check_manage_permission!
return if can_manage_college? return if can_manage_college?
redirect_to '/403' tip_exception(403, "")
end end
def can_manage_college? def can_manage_college?
@ -160,7 +154,7 @@ class CollegesController < ApplicationController
return true if current_user.is_teacher? && current_user.school_id == current_school.id # 学校老师 return true if current_user.is_teacher? && current_user.school_id == current_school.id # 学校老师
# return true if current_school.customers.exists? && current_user.partner&.partner_customers&.exists?(customer_id: current_school.customer_id) # return true if current_school.customers.exists? && current_user.partner&.partner_customers&.exists?(customer_id: current_school.customer_id)
false tip_exception(403, "")
end end
def current_school def current_school

Loading…
Cancel
Save