From b1e0618742b70e5feb3ade5ebf8ff9b633a67389 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 20 May 2016 15:05:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E8=B5=84=E6=BA=90=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E7=94=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 20ed22f9e..1b4fcd499 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -2894,8 +2894,7 @@ class UsersController < ApplicationController # 导入资源 def import_resources # 别人的资源库是没有权限去看的 - @user = User.find_by_login(params[:id]) - if User.current != @user + if User.current.id != params[:id].to_i render_403 return end