X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/80abb8a0e679f4dd1a7ac00cd629f854af160de5..e513251f7b0f6acdc0c0d6df5792c18358030221:/apps/workbench/app/controllers/actions_controller.rb diff --git a/apps/workbench/app/controllers/actions_controller.rb b/apps/workbench/app/controllers/actions_controller.rb index 926cdef736..58b8cdc54f 100644 --- a/apps/workbench/app/controllers/actions_controller.rb +++ b/apps/workbench/app/controllers/actions_controller.rb @@ -2,15 +2,13 @@ require "arvados/collection" class ActionsController < ApplicationController + # Skip require_thread_api_token if this is a show action + # for an object uuid that supports anonymous access. skip_around_filter :require_thread_api_token, if: proc { |ctrl| Rails.configuration.anonymous_user_token and 'show' == ctrl.action_name and params['uuid'] and - (model_class == Collection or - model_class == Group or - model_class == Job or - model_class == PipelineInstance or - model_class == PipelineTemplate) + model_class.in?([Collection, Group, Job, PipelineInstance, PipelineTemplate]) } skip_filter :require_thread_api_token, only: [:report_issue_popup, :report_issue] skip_filter :check_user_agreements, only: [:report_issue_popup, :report_issue]