Commit 8d5b1057 authored by Markus Koller's avatar Markus Koller

Merge branch 'issue_324629_group' into 'master'

Fix Gitlab/DelegatePredicateMethods offenses

See merge request gitlab-org/gitlab!76004
parents 717f5497 0cc1311f
......@@ -7,7 +7,6 @@ Gitlab/DelegatePredicateMethods:
- app/models/concerns/resolvable_discussion.rb
- app/models/project.rb
- ee/app/models/concerns/ee/ci/metadatable.rb
- ee/app/models/ee/group.rb
- ee/app/models/ee/namespace.rb
- ee/app/models/license.rb
- lib/gitlab/ci/trace/stream.rb
......@@ -56,8 +56,7 @@ module EE
has_one :deletion_schedule, class_name: 'GroupDeletionSchedule'
delegate :deleting_user, :marked_for_deletion_on, to: :deletion_schedule, allow_nil: true
delegate :enforced_group_managed_accounts?, :enforced_sso?, to: :saml_provider, allow_nil: true
delegate :repository_read_only, :repository_read_only?, to: :namespace_settings, allow_nil: true
delegate :repository_read_only, to: :namespace_settings, allow_nil: true
has_one :group_wiki_repository
has_many :repository_storage_moves, class_name: 'Groups::RepositoryStorageMove', inverse_of: :container
......@@ -163,6 +162,18 @@ module EE
group.save
end
end
def enforced_group_managed_accounts?
!!saml_provider&.enforced_group_managed_accounts?
end
def enforced_sso?
!!saml_provider&.enforced_sso?
end
def repository_read_only?
!!namespace_settings&.repository_read_only?
end
end
class_methods do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment