]> source.dussan.org Git - redmine.git/commitdiff
Fixed: News from a project with 'news' module disabled, are still diplayed in the...
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 3 Dec 2009 21:16:08 +0000 (21:16 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 3 Dec 2009 21:16:08 +0000 (21:16 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3120 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/news_controller.rb

index 68d2b2a8b041cc4ce09fe235cdfc1a2b38c8d252..394b5182e92e84de7a84c1d27804a494fe38d4c3 100644 (file)
@@ -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|