X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/8917fa82999bdf0020f623db9869abae99930b56..5af4f00db1cbac83f52bf02b424968fd0ef387b1:/apps/workbench/app/controllers/users_controller.rb diff --git a/apps/workbench/app/controllers/users_controller.rb b/apps/workbench/app/controllers/users_controller.rb index eb07fc3757..27f13b7205 100644 --- a/apps/workbench/app/controllers/users_controller.rb +++ b/apps/workbench/app/controllers/users_controller.rb @@ -5,6 +5,18 @@ class UsersController < ApplicationController skip_before_filter :find_object_by_uuid, only: [:welcome, :activity, :storage] before_filter :ensure_current_user_is_admin, only: [:sudo, :unsetup, :setup] + def show + if params[:uuid] == current_user.uuid + respond_to do |f| + f.html do + redirect_to(params[:return_to] || project_path(params[:uuid])) + end + end + else + super + end + end + def welcome if current_user redirect_to (params[:return_to] || '/')