]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/issues_controller.rb
Fix new rubocop warnings
[rails.git] / app / controllers / issues_controller.rb
index 61f466f626a0ef94e27fc908e0b670d0f6aaac82..d136e7230a4b7baf3ccd6eebfda383843598fdc2 100644 (file)
@@ -80,6 +80,8 @@ class IssuesController < ApplicationController
   private
 
   def find_issue
-    @issue = Issue.find(params[:id])
+    @issue = Issue.visible_to(current_user).find(params[:id])
+  rescue ActiveRecord::RecordNotFound
+    head :not_found
   end
 end