diff options
Diffstat (limited to 'app/services/labels/update_service.rb')
-rw-r--r-- | app/services/labels/update_service.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/services/labels/update_service.rb b/app/services/labels/update_service.rb index 4ac54959e84..0ffb0fabf21 100644 --- a/app/services/labels/update_service.rb +++ b/app/services/labels/update_service.rb @@ -21,8 +21,12 @@ module Labels def allow_lock_on_merge?(label) return if label.template? return unless label.respond_to?(:parent_container) + return unless label.parent_container.supports_lock_on_merge? - Feature.enabled?(:enforce_locked_labels_on_merge, label.parent_container, type: :ops) + # If we've made it here, then we're allowed to turn it on. However, we do _not_ + # want to allow it to be turned off. So if it's already set, then don't allow the possibility + # that it could be turned off. + !label.lock_on_merge end end end |