From: Tom Clegg Date: Mon, 18 Aug 2014 22:02:47 +0000 (-0400) Subject: 3114: Merge branch 'master' into 3114-copy-to-project X-Git-Tag: 1.1.0~2314^2~2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/d81ea65da05119d5c6480d373b5d42bbee8ae1ad 3114: Merge branch 'master' into 3114-copy-to-project --- d81ea65da05119d5c6480d373b5d42bbee8ae1ad diff --cc apps/workbench/app/controllers/application_controller.rb index 160730331d,b62636166c..98bc53ae46 --- a/apps/workbench/app/controllers/application_controller.rb +++ b/apps/workbench/app/controllers/application_controller.rb @@@ -174,12 -202,10 +202,10 @@@ class ApplicationController < ActionCon return render_not_found("object not found") end respond_to do |f| - f.json { render json: @object.attributes.merge(href: url_for(@object)) } + f.json { render json: @object.attributes.merge(href: url_for(action: :show, id: @object)) } f.html { if params['tab_pane'] - comparable = self.respond_to? :compare - render(partial: 'show_' + params['tab_pane'].downcase, - locals: { comparable: comparable, objects: @objects }) + render_pane params['tab_pane'] elsif request.method.in? ['GET', 'HEAD'] render else diff --cc apps/workbench/app/controllers/users_controller.rb index d817b32711,eb07fc3757..189f295f8f --- a/apps/workbench/app/controllers/users_controller.rb +++ b/apps/workbench/app/controllers/users_controller.rb @@@ -1,19 -1,13 +1,21 @@@ class UsersController < ApplicationController - skip_before_filter :find_object_by_uuid, :only => [:welcome, :activity, :storage] + skip_around_filter :require_thread_api_token, only: :welcome + skip_before_filter :check_user_agreements, only: [:welcome, :inactive] + skip_before_filter :check_user_profile, only: [:welcome, :inactive, :profile] + 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' - home + redirect_to (params[:return_to] || '/') end end