590ddfdcba
These changes are backported from EE, related to SAML settings in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4549
7 lines
210 B
Ruby
7 lines
210 B
Ruby
class TopLevelGroupValidator < ActiveModel::EachValidator
|
|
def validate_each(record, attribute, value)
|
|
if value&.subgroup?
|
|
record.errors.add(attribute, "must be a top level Group")
|
|
end
|
|
end
|
|
end
|