X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ae00fa84c8f981e909c61ab31b6115bb96e859cc..fe81ac334cfef04751a959297dca24e472cb025f:/app/controllers/issues_controller.rb diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index fe900d627..516fb68ce 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -18,8 +18,8 @@ class IssuesController < ApplicationController @title = t ".title" @issue_types = [] - @issue_types.push("Note", "User") if current_user.moderator? - @issue_types.push("DiaryEntry", "DiaryComment", "User") if current_user.administrator? + @issue_types |= %w[Note User] if current_user.moderator? + @issue_types |= %w[DiaryEntry DiaryComment User] if current_user.administrator? @users = User.joins(:roles).where(:user_roles => { :role => current_user.roles.map(&:role) }).distinct @issues = Issue.visible_to(current_user)