From 1d7c0eb7c02d22f65ed1e4443abcf92b5bd7a899 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 5 Jul 2012 13:29:07 +0000 Subject: [PATCH] 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 --- app/models/query.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/models/query.rb b/app/models/query.rb index 3f4173a1b..42309e01a 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -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)