diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-11 18:15:55 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-11 18:15:55 +0300 |
commit | a8281ac43424e4b820286823bdb48f068b21d7d3 (patch) | |
tree | f8064c724e33f22402ecc4bd0a8c23ea01e6eac1 /app/models/namespace_setting.rb | |
parent | 22391da1261240ecc15aa15cbb19b089339902b5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/namespace_setting.rb')
-rw-r--r-- | app/models/namespace_setting.rb | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/app/models/namespace_setting.rb b/app/models/namespace_setting.rb index 170b29e9e21..ed0ac092954 100644 --- a/app/models/namespace_setting.rb +++ b/app/models/namespace_setting.rb @@ -12,9 +12,6 @@ class NamespaceSetting < ApplicationRecord validate :allow_mfa_for_group validate :allow_resource_access_token_creation_for_group - before_save :set_prevent_sharing_groups_outside_hierarchy, if: -> { user_cap_enabled? } - after_save :disable_project_sharing!, if: -> { user_cap_enabled? } - before_validation :normalize_default_branch_name enum jobs_to_be_done: { basics: 0, move_repository: 1, code_storage: 2, exploring: 3, ci: 4, other: 5 }, _suffix: true @@ -59,18 +56,6 @@ class NamespaceSetting < ApplicationRecord errors.add(:resource_access_token_creation_allowed, _('is not allowed since the group is not top-level group.')) end end - - def set_prevent_sharing_groups_outside_hierarchy - self.prevent_sharing_groups_outside_hierarchy = true - end - - def disable_project_sharing! - namespace.update_attribute(:share_with_group_lock, true) - end - - def user_cap_enabled? - new_user_signups_cap.present? && namespace.root? - end end NamespaceSetting.prepend_mod_with('NamespaceSetting') |