From edebf116a9f743a7a276d514c4cbad72c3406922 Mon Sep 17 00:00:00 2001 From: Phil Hodgson Date: Wed, 13 Aug 2014 11:12:36 -0400 Subject: [PATCH] 3114: When current user, show root/home project rather than user attributes when landing on show user page. (This is meant to be a compromise due to the fact that a home project's uuid has "user" as its arvados type, rather than "group".) --- apps/workbench/app/controllers/users_controller.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/workbench/app/controllers/users_controller.rb b/apps/workbench/app/controllers/users_controller.rb index 67b51a9bc9..d817b32711 100644 --- a/apps/workbench/app/controllers/users_controller.rb +++ b/apps/workbench/app/controllers/users_controller.rb @@ -2,6 +2,14 @@ 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 + redirect_to project_path(params[:uuid]) + else + super + end + end + def welcome if current_user params[:action] = 'home' -- 2.30.2