summaryrefslogtreecommitdiff
path: root/app/finders/issuable_finder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/finders/issuable_finder.rb')
-rw-r--r--app/finders/issuable_finder.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb
index 922b53b514d..fc03d5cd90c 100644
--- a/app/finders/issuable_finder.rb
+++ b/app/finders/issuable_finder.rb
@@ -4,6 +4,9 @@
#
# Used to filter Issues and MergeRequests collections by set of params
#
+# Note: This class is NOT meant to be instantiated. Instead you should
+# look at IssuesFinder or EpicsFinder, which inherit from this.
+#
# Arguments:
# klass - actual class like Issue or MergeRequest
# current_user - which user use
@@ -92,6 +95,10 @@ class IssuableFinder
IssuableFinder::Params
end
+ def klass
+ raise NotImplementedError
+ end
+
def initialize(current_user, params = {})
@current_user = current_user
@params = params_class.new(params, current_user, klass)
@@ -451,6 +458,7 @@ class IssuableFinder
def by_release(items)
return items unless params.releases?
+ return items if params.group? # don't allow release filtering at group level
if params.filter_by_no_release?
items.without_release