diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-11 13:08:52 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-11 13:08:52 +0000 |
commit | bdd3ccf8e52c69d2b6e16e7230a1b8f9a6c69e60 (patch) | |
tree | 1571b147765d42bccab602cdd9a79499829de612 /app/models/issue_query.rb | |
parent | 140ca9532c1c12b7ff710c076c6985dce18500e4 (diff) | |
download | redmine-bdd3ccf8e52c69d2b6e16e7230a1b8f9a6c69e60.tar.gz redmine-bdd3ccf8e52c69d2b6e16e7230a1b8f9a6c69e60.zip |
Adds a role setting for controlling visibility of users: all or members of visible projects (#11724).
git-svn-id: http://svn.redmine.org/redmine/trunk@13584 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue_query.rb')
-rw-r--r-- | app/models/issue_query.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 15c49c5d6..8140163d8 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -131,17 +131,17 @@ class IssueQuery < Query issue_custom_fields = [] if project - principals += project.principals.sort + principals += project.principals.visible unless project.leaf? subprojects = project.descendants.visible.to_a - principals += Principal.member_of(subprojects) + principals += Principal.member_of(subprojects).visible end versions = project.shared_versions.to_a categories = project.issue_categories.to_a issue_custom_fields = project.all_issue_custom_fields else if all_projects.any? - principals += Principal.member_of(all_projects) + principals += Principal.member_of(all_projects).visible end versions = Version.visible.where(:sharing => 'system').to_a issue_custom_fields = IssueCustomField.where(:is_for_all => true) @@ -185,7 +185,7 @@ class IssueQuery < Query :type => :list_optional, :values => assigned_to_values ) unless assigned_to_values.empty? - group_values = Group.givable.collect {|g| [g.name, g.id.to_s] } + group_values = Group.givable.visible.collect {|g| [g.name, g.id.to_s] } add_available_filter("member_of_group", :type => :list_optional, :values => group_values ) unless group_values.empty? |