X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2ff5d889c8d169a85781d13edcf7988fb94cc248..b20cc78fe133ad073edaa1f07effa90297015e99:/apps/workbench/app/controllers/projects_controller.rb diff --git a/apps/workbench/app/controllers/projects_controller.rb b/apps/workbench/app/controllers/projects_controller.rb index d243ef4268..bf1bc937e0 100644 --- a/apps/workbench/app/controllers/projects_controller.rb +++ b/apps/workbench/app/controllers/projects_controller.rb @@ -3,6 +3,31 @@ class ProjectsController < ApplicationController Group end + def find_object_by_uuid + if current_user and params[:uuid] == current_user.uuid + @object = current_user.dup + @object.uuid = current_user.uuid + class << @object + def name + 'Home' + end + def description + '' + end + def attribute_editable? attr, *args + case attr + when 'description', 'name' + false + else + super + end + end + end + else + super + end + end + def index_pane_list %w(Projects) end @@ -71,12 +96,7 @@ class ProjectsController < ApplicationController dst.owner_uuid = target_uuid dst.tail_uuid = target_uuid if dst.class == Link end - begin - dst.save! - rescue - dst.name += " (#{Time.now.localtime})" if dst.respond_to? :name= - dst.save! - end + dst.save! end end session[:selected_move_items] = nil