]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/trace_controller.rb
Allow admins and moderators to delete traces
[rails.git] / app / controllers / trace_controller.rb
index a720c5fff438dc1ed4e8d9152e85dacf44ed4cc1..81c7864738cf3d5208a1566f23c7a2a86becd9fd 100644 (file)
@@ -186,7 +186,7 @@ class TraceController < ApplicationController
 
     if !trace.visible?
       head :not_found
-    elsif current_user.nil? || trace.user != current_user
+    elsif current_user.nil? || (trace.user != current_user && !current_user.administrator? && !current_user.moderator?)
       head :forbidden
     else
       trace.visible = false