diff options
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 |