From e03d80de69e8db96489be19e9452cc4929c8f04d Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 16 Jan 2017 15:28:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=B4=E5=90=A7=E5=B8=96=E5=AD=90=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E4=BA=BA=E5=88=A0=E9=99=A4=E5=B8=96=E5=AD=90=E6=8A=A5?= =?UTF-8?q?=E2=80=9C=E9=A1=B5=E9=9D=A2=E4=B8=8D=E5=AD=98=E5=9C=A8=E2=80=9D?= =?UTF-8?q?=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/models/memo.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/memo.rb b/app/models/memo.rb index 3c36875d1..da84ffcda 100644 --- a/app/models/memo.rb +++ b/app/models/memo.rb @@ -203,7 +203,7 @@ class Memo < ActiveRecord::Base end def destroyable_by? user - (user && self.author == user) || user.admin? || self.forum.creator == user + (user && self.author == user) || user.admin? || self.forum.creator == user || Memo.find(self.root_id).author == user #self.author == user || user.admin? end