From e6e001246f48fc0b7c0124a5d2b50d3178529b67 Mon Sep 17 00:00:00 2001 From: yanxd Date: Sun, 11 May 2014 12:11:36 +0800 Subject: [PATCH] =?UTF-8?q?#=20=E5=BF=85=E5=A1=AB=E8=87=AA=E5=B7=B1?= =?UTF-8?q?=E7=9A=84=E5=B7=A5=E4=BD=9C=E5=8D=95=E4=BD=8D=EF=BC=8C=E5=85=B6?= =?UTF-8?q?=E5=AE=9E=E5=B0=B1=E6=98=AF=E5=AD=A6=E6=A0=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index f68555055..dff26ce19 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