6234: In /users page, display the "Show" button to admin users as well; however,...
[arvados.git] / apps / workbench / app / controllers / users_controller.rb
index ac3ea606e9f7421fca4b867be61f7a21a1180ece..2f513655b6e9424374f0ed90d559acc9a711d236 100644 (file)
@@ -9,7 +9,11 @@ class UsersController < ApplicationController
     if params[:uuid] == current_user.uuid
       respond_to do |f|
         f.html do
-          redirect_to(params[:return_to] || project_path(params[:uuid]))
+          if request.url.include?("/users/#{current_user.uuid}")
+            super
+          else
+            redirect_to(params[:return_to] || project_path(params[:uuid]))
+          end
         end
       end
     else