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/models/ci/secure_file.rb')
-rw-r--r--app/models/ci/secure_file.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/ci/secure_file.rb b/app/models/ci/secure_file.rb
index 5e273e0fd4b..af04db0a153 100644
--- a/app/models/ci/secure_file.rb
+++ b/app/models/ci/secure_file.rb
@@ -29,6 +29,7 @@ module Ci
scope :order_by_created_at, -> { order(created_at: :desc) }
scope :project_id_in, ->(ids) { where(project_id: ids) }
+ scope :with_files_stored_locally, -> { where(file_store: Ci::SecureFileUploader::Store::LOCAL) }
def checksum_algorithm
CHECKSUM_ALGORITHM
@@ -69,6 +70,10 @@ module Ci
end
end
+ def local?
+ file_store == ObjectStorage::Store::LOCAL
+ end
+
private
def assign_checksum