diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-03 21:08:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-03 21:08:34 +0300 |
commit | cf7d071ff1d52a34d1411d8916f251d589bd6381 (patch) | |
tree | d3ca63aba3d1b97964ab9c23d9f2c38884d2d662 /app/models/project.rb | |
parent | 4eef6c2c97b50f2305c561f0e1c6f0e14e661642 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 13 |
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 |