diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-13 15:12:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-13 15:12:59 +0300 |
commit | b0891151f160d287e48a5317d3152b195ef950ae (patch) | |
tree | 88070363b2f28de0dfb3b0bdf77d71e9fa228e54 /app/models/packages | |
parent | 9bc96aa4f94943af9972ca7058ed31771bbcaa53 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/packages')
-rw-r--r-- | app/models/packages/conan/metadatum.rb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/app/models/packages/conan/metadatum.rb b/app/models/packages/conan/metadatum.rb index ad4b499c1e5..58af34879af 100644 --- a/app/models/packages/conan/metadatum.rb +++ b/app/models/packages/conan/metadatum.rb @@ -10,17 +10,10 @@ class Packages::Conan::Metadatum < ApplicationRecord validates :package_username, :package_channel, presence: true, - format: { with: Gitlab::Regex.conan_recipe_component_regex }, - if: -> { Feature.disabled?(:packages_conan_allow_empty_username_channel) } - - validates :package_username, - :package_channel, - presence: true, - format: { with: Gitlab::Regex.conan_recipe_user_channel_regex }, - if: -> { Feature.enabled?(:packages_conan_allow_empty_username_channel) } + format: { with: Gitlab::Regex.conan_recipe_user_channel_regex } validate :conan_package_type - validate :username_channel_none_values, if: -> { Feature.enabled?(:packages_conan_allow_empty_username_channel) } + validate :username_channel_none_values def recipe "#{package.name}/#{package.version}@#{package_username}/#{package_channel}" |