diff options
author | Robert Schilling <2900-razer6@users.noreply.gitlab.com> | 2019-02-13 10:51:12 +0000 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2019-02-13 10:51:12 +0000 |
commit | b178443854861befaa78798ee11273102767f28e (patch) | |
tree | 0a57fa61ea687e51e20ab35881ab68af6b5b496b /app/models/releases | |
parent | 2b68d0cdb36bf6b59efff9ca7209da65ed61777e (diff) | |
download | gitlab-ce-b178443854861befaa78798ee11273102767f28e.tar.gz |
Add support for FTP assets for releases
Extend the list of supported protocols to include FTP.
Diffstat (limited to 'app/models/releases')
-rw-r--r-- | app/models/releases/link.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/releases/link.rb b/app/models/releases/link.rb index 6f639e5a7b2..6c507c47752 100644 --- a/app/models/releases/link.rb +++ b/app/models/releases/link.rb @@ -6,7 +6,7 @@ module Releases belongs_to :release - validates :url, presence: true, url: true, uniqueness: { scope: :release } + validates :url, presence: true, url: { protocols: %w(http https ftp) }, uniqueness: { scope: :release } validates :name, presence: true, uniqueness: { scope: :release } scope :sorted, -> { order(created_at: :desc) } |