From 54f51ff3f48c1cc0f9d3a33810126886f6327803 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sat, 4 May 2019 11:23:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E5=83=8F=E8=A2=AB=E4=B8=B2=E6=94=B9?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/avatar_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/avatar_controller.rb b/app/controllers/avatar_controller.rb index 52971121..7a276ae5 100644 --- a/app/controllers/avatar_controller.rb +++ b/app/controllers/avatar_controller.rb @@ -9,6 +9,7 @@ class AvatarController < ApplicationController def upload if params[:source_type] == "User" && !(User.current.admin? || User.current.id == params[:source_id].to_i) render_403 + return end # Make sure that API users get used to set this content type