X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/1b18f10835f5dd4a32cfeb79697f1058d9b1e383..74c3346a12b71f8c85e4fae6c390a9e374bc39a8:/services/api/app/helpers/application_helper.rb diff --git a/services/api/app/helpers/application_helper.rb b/services/api/app/helpers/application_helper.rb index 385477562d..c5999b3714 100644 --- a/services/api/app/helpers/application_helper.rb +++ b/services/api/app/helpers/application_helper.rb @@ -1,25 +1,3 @@ module ApplicationHelper - def current_user - controller.current_user - end - - def act_as_system_user - if not $system_user - Thread.current[:user] = User.new(is_admin: true) - sysuser_id = [Server::Application.config.uuid_prefix, - User.uuid_prefix, - '000000000000000'].join('-') - $system_user = User.where('uuid=?', sysuser_id).first - if !$system_user - $system_user = User.new(uuid: sysuser_id, - is_admin: true, - email: 'root', - first_name: 'root', - last_name: '') - $system_user.save! - $system_user.reload - end - end - Thread.current[:user] = $system_user - end + include CurrentApiClient end