1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 Disable_update_jobs_api_method_list = {"jobs.create"=>{},
6 "pipeline_instances.create"=>{},
7 "pipeline_templates.create"=>{},
9 "pipeline_instances.update"=>{},
10 "pipeline_templates.update"=>{},
11 "job_tasks.create"=>{},
12 "job_tasks.update"=>{}}
14 Disable_jobs_api_method_list = {"jobs.create"=>{},
15 "pipeline_instances.create"=>{},
16 "pipeline_templates.create"=>{},
18 "pipeline_instances.get"=>{},
19 "pipeline_templates.get"=>{},
21 "pipeline_instances.list"=>{},
22 "pipeline_templates.list"=>{},
24 "pipeline_instances.index"=>{},
25 "pipeline_templates.index"=>{},
27 "pipeline_instances.update"=>{},
28 "pipeline_templates.update"=>{},
30 "jobs.queue_size"=>{},
31 "job_tasks.create"=>{},
34 "job_tasks.index"=>{},
35 "job_tasks.update"=>{},
37 "pipeline_instances.show"=>{},
38 "pipeline_templates.show"=>{},
41 def check_enable_legacy_jobs_api
42 # Create/update is permanently disabled (legacy functionality has been removed)
43 Rails.configuration.API.DisabledAPIs.merge! Disable_update_jobs_api_method_list
45 if Rails.configuration.Containers.JobsAPI.Enable == "false" ||
46 (Rails.configuration.Containers.JobsAPI.Enable == "auto" &&
48 Rails.configuration.API.DisabledAPIs.merge! Disable_jobs_api_method_list