Sha256: e88785917eca6f4ead5895d03d9d66e7e47aad73a28018d464a24739f97e63ed
Contents?: true
Size: 493 Bytes
Versions: 19
Compression:
Stored size: 493 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
19 entries across 19 versions & 1 rubygems