鹏程访问实训页面

dev_shixuns
cxt 6 years ago
parent d20dcae329
commit e7205ddc5a

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

Loading…
Cancel
Save