Commit 8bc0f788 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Fixed: News from a project with 'news' module disabled, are still diplayed in…

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
parent e02da729
......@@ -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|
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment