Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/concerns/uploads_actions.rb')
-rw-r--r--app/controllers/concerns/uploads_actions.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/concerns/uploads_actions.rb b/app/controllers/concerns/uploads_actions.rb
index f489de42864..e1bfe92f61b 100644
--- a/app/controllers/concerns/uploads_actions.rb
+++ b/app/controllers/concerns/uploads_actions.rb
@@ -142,6 +142,14 @@ module UploadsActions
uploader && uploader.exists? && uploader.embeddable?
end
+ def bypass_auth_checks_on_uploads?
+ if ::Feature.enabled?(:enforce_auth_checks_on_uploads, default_enabled: :yaml)
+ false
+ else
+ action_name == 'show' && embeddable?
+ end
+ end
+
def find_model
nil
end