]> git.openstreetmap.org Git - rails.git/commitdiff
Simplify redirect.
authorAndy Allan <git@gravitystorm.co.uk>
Fri, 9 Mar 2018 07:56:56 +0000 (15:56 +0800)
committerAndy Allan <git@gravitystorm.co.uk>
Fri, 9 Mar 2018 07:56:56 +0000 (15:56 +0800)
app/controllers/trace_controller.rb

index 5dd49c6be704edf8400663be9712d574308aa01d..ce24940012f800d21081a8fd6363c090f600a80d 100644 (file)
@@ -192,11 +192,7 @@ class TraceController < ApplicationController
       trace.visible = false
       trace.save
       flash[:notice] = t "trace.delete.scheduled_for_deletion"
-      if current_user.administrator? || current_user.moderator?
-        redirect_to :action => :list, :display_name => trace.user.display_name
-      else
-        redirect_to :action => :list, :display_name => current_user.display_name
-      end
+      redirect_to :action => :list, :display_name => trace.user.display_name
     end
   rescue ActiveRecord::RecordNotFound
     head :not_found