diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-12 15:08:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-12 15:08:30 +0300 |
commit | cb3b9f9243555b0c26145e2992a9f01f7fa47bf5 (patch) | |
tree | 5fea3438f0c21330e2fba8c958cbc505810ab990 /app/models/ci/secure_file.rb | |
parent | 71d34aac9a0fae0507c265929767422391816b01 (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 | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/models/ci/secure_file.rb b/app/models/ci/secure_file.rb index 6a26a5341aa..9c82e106d6e 100644 --- a/app/models/ci/secure_file.rb +++ b/app/models/ci/secure_file.rb @@ -3,8 +3,11 @@ module Ci class SecureFile < Ci::ApplicationRecord include FileStoreMounter + include IgnorableColumns include Limitable + ignore_column :permissions, remove_with: '15.2', remove_after: '2022-06-22' + FILE_SIZE_LIMIT = 5.megabytes.freeze CHECKSUM_ALGORITHM = 'sha256' @@ -14,14 +17,12 @@ module Ci belongs_to :project, optional: false validates :file, presence: true, file_size: { maximum: FILE_SIZE_LIMIT } - validates :checksum, :file_store, :name, :permissions, :project_id, presence: true + validates :checksum, :file_store, :name, :project_id, presence: true validates :name, uniqueness: { scope: :project } after_initialize :generate_key_data before_validation :assign_checksum - enum permissions: { read_only: 0, read_write: 1, execute: 2 } - default_value_for(:file_store) { Ci::SecureFileUploader.default_store } mount_file_store_uploader Ci::SecureFileUploader |