Sha256: 7ca9d71d26c1662bf7597c113fedbad60d8dee18b9bbc99ab05a5cbdbeda72c7
Contents?: true
Size: 491 Bytes
Versions: 231
Compression:
Stored size: 491 Bytes
Contents
module Katello module Validators class RepoDisablementValidator < ActiveModel::Validator def validate(record) if record.redhat? && record.enabled_changed? && !record.enabled? && record.promoted? record.errors[:base] << N_("Repository cannot be disabled since it has already been promoted.") elsif !record.redhat? && !record.enabled? record.errors[:base] << N_("Custom repositories cannot be disabled.") end end end end end
Version data entries
231 entries across 231 versions & 1 rubygems