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:
authorFrancisco Javier López <fjlopez@gitlab.com>2018-06-11 16:29:37 +0300
committerDouwe Maan <douwe@gitlab.com>2018-06-11 16:29:37 +0300
commit1418afc2d6e7699f08a1fc5f33b78ea847ac1451 (patch)
tree7f1cd2621237c4dd234651bd16d6e304989b731d /app/models/remote_mirror.rb
parent180dc237152d60d05e4f75d8c936e81ba783b6cd (diff)
Avoid checking the user format in every url validation
Diffstat (limited to 'app/models/remote_mirror.rb')
-rw-r--r--app/models/remote_mirror.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/remote_mirror.rb b/app/models/remote_mirror.rb
index 5cd222e18a4..c4b5dd2dc96 100644
--- a/app/models/remote_mirror.rb
+++ b/app/models/remote_mirror.rb
@@ -16,7 +16,7 @@ class RemoteMirror < ActiveRecord::Base
belongs_to :project, inverse_of: :remote_mirrors
- validates :url, presence: true, url: { protocols: %w(ssh git http https), allow_blank: true }
+ validates :url, presence: true, url: { protocols: %w(ssh git http https), allow_blank: true, enforce_user: true }
before_save :set_new_remote_name, if: :mirror_url_changed?