From 4edee2971a9772db05d9af4cb687bce2d1aff7af Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Thu, 2 Jan 2025 21:53:41 +0200 Subject: [PATCH] superadmin file download --- app/controllers/api/active_storage_blobs_proxy_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/api/active_storage_blobs_proxy_controller.rb b/app/controllers/api/active_storage_blobs_proxy_controller.rb index 47f56e7e..f023f021 100644 --- a/app/controllers/api/active_storage_blobs_proxy_controller.rb +++ b/app/controllers/api/active_storage_blobs_proxy_controller.rb @@ -42,6 +42,7 @@ module Api is_authorized = attachment.name.in?(%w[logo preview_images]) || (current_user && attachment.record.account.id == current_user.account_id) || + (current_user && !Docuseal.multitenant? && current_user.role == 'superadmin') || !attachment.record.account.account_configs .find_or_initialize_by(key: AccountConfig::DOWNLOAD_LINKS_AUTH_KEY).value