diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 03:07:43 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 03:07:43 +0300 |
commit | 8a55899cab04afa065fc681b42da746c93de7bfe (patch) | |
tree | 2b99a3340edf639216b46904a34867e7226d9c6a /app/models/ci/secure_file.rb | |
parent | 93003eb1155fdc2ce078fa03c74d7f15e83a80de (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.rb | 4 |
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 } |