From f095633f2feb48d917ea7523f7b05c42592914c4 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 8 Nov 2014 11:09:42 +0000 Subject: [PATCH] Prevents author load (#18290). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Patch by Ondřej Ezr. git-svn-id: http://svn.redmine.org/redmine/trunk@13576 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index 0f0cbf995..b337cd561 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -449,7 +449,7 @@ class Issue < ActiveRecord::Base safe_attributes 'is_private', :if => lambda {|issue, user| user.allowed_to?(:set_issues_private, issue.project) || - (issue.author == user && user.allowed_to?(:set_own_issues_private, issue.project)) + (issue.author_id == user.id && user.allowed_to?(:set_own_issues_private, issue.project)) } safe_attributes 'parent_issue_id', -- 2.39.5