diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-04-05 12:50:19 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-04-05 12:50:19 +0000 |
commit | 405fc07e90730c550f1e690a446eda872fd8732d (patch) | |
tree | 31e34beee0e4475e530fbeba6e6a5631f6fe3e4f /app/models/news.rb | |
parent | c2095f5e2f4e92dcfae3d7d5ccbe8900844c5361 (diff) | |
download | redmine-405fc07e90730c550f1e690a446eda872fd8732d.tar.gz redmine-405fc07e90730c550f1e690a446eda872fd8732d.zip |
Makes visible scopes accept projects option and deprecate Project.visible_by.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5324 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/news.rb')
-rw-r--r-- | app/models/news.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/news.rb b/app/models/news.rb index 7f8c73107..9e7cb1e19 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -34,7 +34,7 @@ class News < ActiveRecord::Base named_scope :visible, lambda {|*args| { :include => :project, - :conditions => Project.allowed_to_condition(args.first || User.current, :view_news) + :conditions => Project.allowed_to_condition(args.shift || User.current, :view_news, *args) }} def visible?(user=User.current) |