diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-12-03 21:16:08 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-12-03 21:16:08 +0000 |
commit | 8bc0f7888bdddf452bbaa97c86e22b6ebc0aac58 (patch) | |
tree | 588294182806e7855656adf6415151ea46860581 /app | |
parent | e02da72947d21c85a86f49e2bdd98d06a2951939 (diff) | |
download | redmine-8bc0f7888bdddf452bbaa97c86e22b6ebc0aac58.tar.gz redmine-8bc0f7888bdddf452bbaa97c86e22b6ebc0aac58.zip |
Fixed: News from a project with 'news' module disabled, are still diplayed in the cross-project news list (#4333).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3120 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/news_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index 68d2b2a8b..394b5182e 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -26,7 +26,7 @@ class NewsController < ApplicationController def index @news_pages, @newss = paginate :news, :per_page => 10, - :conditions => (@project ? {:project_id => @project.id} : Project.visible_by(User.current)), + :conditions => Project.allowed_to_condition(User.current, :view_news, :project => @project), :include => [:author, :project], :order => "#{News.table_name}.created_on DESC" respond_to do |format| |