projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '16265-security-updates' into dependabot/bundler/apps/workbench/nokogiri...
[arvados.git]
/
apps
/
workbench
/
app
/
controllers
/
jobs_controller.rb
diff --git
a/apps/workbench/app/controllers/jobs_controller.rb
b/apps/workbench/app/controllers/jobs_controller.rb
index f18a79d646c4a0a1dc774e52f0c2d4da1c8f9346..e5c71cb275ed19b21b5db637d49fe7e356b64aea 100644
(file)
--- a/
apps/workbench/app/controllers/jobs_controller.rb
+++ b/
apps/workbench/app/controllers/jobs_controller.rb
@@
-1,6
+1,10
@@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
class JobsController < ApplicationController
class JobsController < ApplicationController
- skip_around_
filter
:require_thread_api_token, if: proc { |ctrl|
-
Rails.configuration.anonymous_user_token
and
+ skip_around_
action
:require_thread_api_token, if: proc { |ctrl|
+
!Rails.configuration.Users.AnonymousUserToken.empty?
and
'show' == ctrl.action_name
}
'show' == ctrl.action_name
}
@@
-20,11
+24,11
@@
class JobsController < ApplicationController
nodes[j[:script_version]] = {:uuid => j[:script_version]}
end
nodes[j[:script_version]] = {:uuid => j[:script_version]}
end
- Collection.where(uuid: collections).each do |c|
+ Collection.where(uuid: collections).
with_count("none").
each do |c|
nodes[c[:portable_data_hash]] = c
end
nodes[c[:portable_data_hash]] = c
end
- Collection.where(portable_data_hash: hashes).each do |c|
+ Collection.where(portable_data_hash: hashes).
with_count("none").
each do |c|
nodes[c[:portable_data_hash]] = c
end
nodes[c[:portable_data_hash]] = c
end
@@
-62,7
+66,7
@@
class JobsController < ApplicationController
def logs
@logs = @object.
def logs
@logs = @object.
- stderr_log_query(Rails.configuration.
running_job_log_records_to_f
etch).
+ stderr_log_query(Rails.configuration.
Workbench.RunningJobLogRecordsToF
etch).
map { |e| e.serializable_hash.merge({ 'prepend' => true }) }
respond_to do |format|
format.json { render json: @logs }
map { |e| e.serializable_hash.merge({ 'prepend' => true }) }
respond_to do |format|
format.json { render json: @logs }