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:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-03 21:08:34 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-03 21:08:34 +0300
commitcf7d071ff1d52a34d1411d8916f251d589bd6381 (patch)
treed3ca63aba3d1b97964ab9c23d9f2c38884d2d662 /app/models/project.rb
parent4eef6c2c97b50f2305c561f0e1c6f0e14e661642 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb13
1 files changed, 5 insertions, 8 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 4b7a98a2352..217e801e07f 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -756,16 +756,13 @@ class Project < ApplicationRecord
end
end
- # Defines instance methods:
+ # Define two instance methods:
#
- # - only_allow_merge_if_pipeline_succeeds?(inherit_group_setting: false)
- # - allow_merge_on_skipped_pipeline?(inherit_group_setting: false)
- # - only_allow_merge_if_all_discussions_are_resolved?(inherit_group_setting: false)
- # - only_allow_merge_if_pipeline_succeeds_locked?
- # - allow_merge_on_skipped_pipeline_locked?
- # - only_allow_merge_if_all_discussions_are_resolved_locked?
+ # - [attribute]?(inherit_group_setting) Returns the final value after inheriting the parent group
+ # - [attribute]_locked? Returns true if the value is inherited from the parent group
+ #
+ # These functions will be overridden in EE to make sense afterwards
def self.cascading_with_parent_namespace(attribute)
- # method overriden in EE
define_method("#{attribute}?") do |inherit_group_setting: false|
self.public_send(attribute) # rubocop:disable GitlabSecurity/PublicSend
end