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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-03-18 03:07:43 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-03-18 03:07:43 +0300
commit8a55899cab04afa065fc681b42da746c93de7bfe (patch)
tree2b99a3340edf639216b46904a34867e7226d9c6a /app/models/ci/secure_file.rb
parent93003eb1155fdc2ce078fa03c74d7f15e83a80de (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/ci/secure_file.rb')
-rw-r--r--app/models/ci/secure_file.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/ci/secure_file.rb b/app/models/ci/secure_file.rb
index 56f632b6232..18f0093ea41 100644
--- a/app/models/ci/secure_file.rb
+++ b/app/models/ci/secure_file.rb
@@ -3,10 +3,14 @@
module Ci
class SecureFile < Ci::ApplicationRecord
include FileStoreMounter
+ include Limitable
FILE_SIZE_LIMIT = 5.megabytes.freeze
CHECKSUM_ALGORITHM = 'sha256'
+ self.limit_scope = :project
+ self.limit_name = 'project_ci_secure_files'
+
belongs_to :project, optional: false
validates :file, presence: true, file_size: { maximum: FILE_SIZE_LIMIT }