X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d3700e6201b4b78a70bbb2941572edc985b63c2c..4ae7bb4178150fffe3857782f9e4edf158215eed:/app/controllers/issues_controller.rb?ds=inline diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 729528946..d4e9a3bdf 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -2,6 +2,7 @@ class IssuesController < ApplicationController layout "site" before_action :authorize_web + before_action :set_locale before_action :require_user before_action :check_permission before_action :find_issue, :only => [:show, :resolve, :reopen, :ignore] @@ -14,7 +15,7 @@ class IssuesController < ApplicationController @issue_types.concat %w[DiaryEntry DiaryComment User] if current_user.administrator? @users = User.joins(:roles).where(:user_roles => { :role => current_user.roles.map(&:role) }).distinct - @issues = Issue.where(:assigned_role => current_user.roles.map(&:role)) + @issues = Issue.visible_to(current_user) # If search if params[:search_by_user] && params[:search_by_user].present?