X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/8c2b89cb6a34b2f1a4ed672e8a883c680ffca80a..30d37841e979eacd15f11cbaf608d507af379a86:/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 350f297af3..8cfc2c10f1 100644 --- a/apps/workbench/app/controllers/users_controller.rb +++ b/apps/workbench/app/controllers/users_controller.rb @@ -1,7 +1,11 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class UsersController < ApplicationController 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 :check_user_agreements, only: [:welcome, :inactive, :link_account, :merge] + skip_before_filter :check_user_profile, only: [:welcome, :inactive, :profile, :link_account, :merge] skip_before_filter :find_object_by_uuid, only: [:welcome, :activity, :storage] before_filter :ensure_current_user_is_admin, only: [:sudo, :unsetup, :setup] @@ -256,28 +260,6 @@ class UsersController < ApplicationController end end - def repositories - # all repositories accessible by current user - all_repositories = Hash[Repository.all.order('name asc').collect {|repo| [repo.uuid, repo]}] - - @my_repositories = [] # we want them ordered as owned and the rest - @repo_writable = {} - - # owned repos - all_repositories.each do |_, repo| - if repo.owner_uuid == current_user.uuid - @repo_writable[repo.uuid] = 'can_write' - @my_repositories << repo - end - end - - # rest of the repos - handled = @my_repositories.map(&:uuid) - all_repositories.each do |_, repo| - @my_repositories << repo if !repo.uuid.in?(handled) - end - end - def virtual_machines @my_vm_logins = {} Link.where(tail_uuid: @object.uuid, @@ -335,6 +317,11 @@ class UsersController < ApplicationController RequestShellAccessReporter.send_request(current_user, params).deliver end + def merge + User.merge params[:new_user_token], params[:direction] + redirect_to "/" + end + protected def find_current_links user