Makes Private column available on the issue list (#8577).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9919 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-07-05 13:29:07 +00:00
parent bd927eea88
commit 1d7c0eb7c0
1 changed files with 5 additions and 0 deletions

View File

@ -388,6 +388,11 @@ class Query < ActiveRecord::Base
)
end
if User.current.allowed_to?(:set_issues_private, nil, :global => true) ||
User.current.allowed_to?(:set_own_issues_private, nil, :global => true)
@available_columns << QueryColumn.new(:is_private, :sortable => "#{Issue.table_name}.is_private")
end
disabled_fields = Tracker.disabled_core_fields(trackers).map {|field| field.sub(/_id$/, '')}
@available_columns.reject! {|column|
disabled_fields.include?(column.name.to_s)