From f8334b3d5b813de57e8245128f540268686004a9 Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Mon, 9 Oct 2017 14:38:33 +0200 Subject: [PATCH] Add editable field to task in tasks tree API call [GIOT-44] --- app/controllers/api/v20170715/core_api_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/api/v20170715/core_api_controller.rb b/app/controllers/api/v20170715/core_api_controller.rb index e06705d9e..6f9e1551d 100644 --- a/app/controllers/api/v20170715/core_api_controller.rb +++ b/app/controllers/api/v20170715/core_api_controller.rb @@ -20,6 +20,7 @@ module Api exp.my_modules.find_each do |tk| task = tk.as_json(only: %i(name description archived)) task['task_id'] = tk.id.to_s + task['editable'] = can_edit_module(tk) tasks << task end experiment['tasks'] = tasks