超级管理员的自动授权单位列表中,仅给”学生“自动授权

dev_haigong
cxt 6 years ago
parent 58dd8d207d
commit 99a47e1c8e

@ -1038,7 +1038,7 @@ class AccountController < ApplicationController
apply_action = ApplyAction.where(:user_id => User.current.id, :container_type => "TrialAuthorization", :status => 0).first
school_ids = School.where(:auto_users_trial => 1).map(&:id)
user_ex = User.current.user_extensions
if (user_ex.identity == 0 || (user_ex.identity == 1 && user_ex.student_id.present?)) && !user_ex.school.nil? && school_ids.include?(user_ex.school_id)
if user_ex.identity == 1 && user_ex.student_id.present? && !user_ex.school.nil? && school_ids.include?(user_ex.school_id)
User.current.update_attributes(:certification => 1)
logger.warn("apply_trail #######{User.current.login} ****#{User.current.user_extensions.school_id}")
@tip = "申请已提交我们将在1分钟内完成审核"

Loading…
Cancel
Save