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/finders/labels_finder.rb')
-rw-r--r--app/finders/labels_finder.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/finders/labels_finder.rb b/app/finders/labels_finder.rb
index b1387f2a104..1bf2e3b71e4 100644
--- a/app/finders/labels_finder.rb
+++ b/app/finders/labels_finder.rb
@@ -24,6 +24,7 @@ class LabelsFinder < UnionFinder
items = with_title(items)
items = by_subscription(items)
items = by_search(items)
+ items = by_locked_labels(items)
items = items.with_preloaded_container if @preload_parent_association
sort(items)
@@ -94,6 +95,12 @@ class LabelsFinder < UnionFinder
labels.optionally_subscribed_by(subscriber_id)
end
+ def by_locked_labels(items)
+ return items unless params[:locked_labels]
+
+ items.with_lock_on_merge
+ end
+
def subscriber_id
current_user&.id if subscribed?
end