Module: Debci::Validators::APTSource

Included in:
API, Job, SelfService
Defined in:
lib/debci/validators.rb

Instance Method Summary collapse

Instance Method Details

#invalid_extra_apt_sources(extra_apt_sources) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/debci/validators.rb', line 4

def invalid_extra_apt_sources(extra_apt_sources)
  invalid_extra_apt_sources = []
  Array(extra_apt_sources).each do |extra_apt_source|
    invalid_extra_apt_sources.push(extra_apt_source) unless !Debci.extra_apt_sources_list.find(extra_apt_source).nil? && Debci.extra_apt_sources_list.find(extra_apt_source).allowed?(@user)
  end
  invalid_extra_apt_sources.join(", ")
end