Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/group.rb')
-rw-r--r--app/models/group.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/models/group.rb b/app/models/group.rb
index c38ddbdf6fb..f8cbaa2495c 100644
--- a/app/models/group.rb
+++ b/app/models/group.rb
@@ -64,6 +64,8 @@ class Group < Namespace
has_one :import_state, class_name: 'GroupImportState', inverse_of: :group
+ has_many :group_deploy_keys_groups, inverse_of: :group
+ has_many :group_deploy_keys, through: :group_deploy_keys_groups
has_many :group_deploy_tokens
has_many :deploy_tokens, through: :group_deploy_tokens
@@ -172,6 +174,10 @@ class Group < Namespace
notification_settings(hierarchy_order: hierarchy_order).where(user: user)
end
+ def packages_feature_enabled?
+ ::Gitlab.config.packages.enabled
+ end
+
def notification_email_for(user)
# Finds the closest notification_setting with a `notification_email`
notification_settings = notification_settings_for(user, hierarchy_order: :asc)
@@ -557,6 +563,10 @@ class Group < Namespace
all_projects.update_all(shared_runners_enabled: false)
end
+ def default_owner
+ owners.first || parent&.default_owner || owner
+ end
+
private
def update_two_factor_requirement