diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-08 11:09:42 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-08 11:09:42 +0000 |
commit | f095633f2feb48d917ea7523f7b05c42592914c4 (patch) | |
tree | 6a4eebb85b237aaf6753d747fe06cafd7f6a7e62 /app | |
parent | 700736de5dce8bf4637c7727c23f0fcca88b67b7 (diff) | |
download | redmine-f095633f2feb48d917ea7523f7b05c42592914c4.tar.gz redmine-f095633f2feb48d917ea7523f7b05c42592914c4.zip |
Prevents author load (#18290).
Patch by Ondřej Ezr.
git-svn-id: http://svn.redmine.org/redmine/trunk@13576 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/issue.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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', |