diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index f6855505..dff26ce1 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -737,8 +737,9 @@ class UsersController < ApplicationController User.current.admin? ? 'base_admin' : default_base end + # 必填自己的工作单位,其实就是学校 def auth_user_extension - if @user.user_extensions.school.nil? + if @user == User.current && @user.user_extensions.school.nil? flash[:error] = l(:error_complete_occupation) redirect_to my_account_path end