From e7205ddc5ab690bb7729b4cdc237ed58857c60e3 Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 6 Mar 2019 16:00:50 +0800 Subject: [PATCH] =?UTF-8?q?=E9=B9=8F=E7=A8=8B=E8=AE=BF=E9=97=AE=E5=AE=9E?= =?UTF-8?q?=E8=AE=AD=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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