10079: show_child_component method needs anonymous access
authorradhika <radhika@curoverse.com>
Wed, 19 Oct 2016 20:19:23 +0000 (16:19 -0400)
committerradhika <radhika@curoverse.com>
Tue, 25 Oct 2016 22:25:40 +0000 (18:25 -0400)
apps/workbench/app/controllers/work_units_controller.rb

index c0845ee7902fcfe042d5f5a8e5c14e992e5c98a8..e37568966083edac66f44bf7d7ff2ff60b278367 100644 (file)
@@ -1,4 +1,9 @@
 class WorkUnitsController < ApplicationController
+  skip_around_filter :require_thread_api_token, if: proc { |ctrl|
+    Rails.configuration.anonymous_user_token and
+    'show_child_component' == ctrl.action_name
+  }
+
   def find_objects_for_index
     # If it's not the index rows partial display, just return
     # The /index request will again be invoked to display the