Merge branch '19954-permission-dedup-doc'
[arvados.git] / apps / workbench / app / controllers / pipeline_templates_controller.rb
index eb5f3793d71b3042cc3fa1138f057c7c3ff9302b..aa444c153b6163d3a65d43bbeb790d2c06688844 100644 (file)
@@ -1,7 +1,12 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
 class PipelineTemplatesController < ApplicationController
-  if Rails.configuration.anonymous_user_token
-    skip_around_filter :require_thread_api_token, only: :show
-  end
+  skip_around_action :require_thread_api_token, if: proc { |ctrl|
+    !Rails.configuration.Users.AnonymousUserToken.empty? and
+    'show' == ctrl.action_name
+  }
 
   include PipelineComponentsHelper