diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index bd7e961a..e6645b3f 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -318,11 +318,15 @@ module ApplicationHelper # TPM查看权限 # result一般为页面权限 def shixun_view_allow shixun, result = nil - if User.current.manager_of_shixun?(shixun) + if params[:openi].to_i == 1 result ? false : true else - if shixun.status == 0 || (shixun.use_scope == 1 && !shixun.schools.map(&:name).include?(User.current.school_name)) - result ? true : (render_403) + if User.current.manager_of_shixun?(shixun) + result ? false : true + else + if shixun.status == 0 || (shixun.use_scope == 1 && !shixun.schools.map(&:name).include?(User.current.school_name)) + result ? true : (render_403) + end end end end