Skip to content
Browse files

Permission filters are properly applied also when project filter is s…

…et to 'All projects', fixes #14
  • Loading branch information...
1 parent 291e6cd commit 68e1a99a0f7acf87195fa8b386fb4d401c5f2500 @abahgat committed Apr 12, 2012
Showing with 6 additions and 5 deletions.
  1. +6 −5 app/controllers/search_issues_controller.rb
View
11 app/controllers/search_issues_controller.rb
@@ -3,7 +3,7 @@ class SearchIssuesController < ApplicationController
def index
- @query = params[:query] || ""
+ @query = params[:query] || ""
@query.strip!
logger.info "Got request for [#{@query}]"
@@ -38,6 +38,7 @@ def index
case Setting.plugin_redmine_didyoumean['project_filter']
when '2'
+ project_tree = Project.all
when '1'
# search subprojects too
project_tree = project ? (project.self_and_descendants.active) : nil
@@ -56,10 +57,10 @@ def index
end
if Setting.plugin_redmine_didyoumean['show_only_open'] == "1"
- valid_statuses = IssueStatus.all(:conditions => ["is_closed <> ?", true])
- logger.info "Valid status ids are #{valid_statuses}"
- conditions += " AND status_id in (?)"
- variables << valid_statuses
+ valid_statuses = IssueStatus.all(:conditions => ["is_closed <> ?", true])
+ logger.info "Valid status ids are #{valid_statuses}"
+ conditions += " AND status_id in (?)"
+ variables << valid_statuses
end
# this should be configurable as well, one day

0 comments on commit 68e1a99

Please sign in to comment.
Something went wrong with that request. Please try again.