debian-mirror-gitlab/app/finders/issues_finder.rb

29 lines
559 B
Ruby
Raw Normal View History

2014-09-02 18:07:02 +05:30
# Finders::Issues class
#
# Used to filter Issues collections by set of params
#
# Arguments:
# current_user - which user use
# params:
# scope: 'created-by-me' or 'assigned-to-me' or 'all'
# state: 'open' or 'closed' or 'all'
# group_id: integer
# project_id: integer
# milestone_id: integer
# assignee_id: integer
# search: string
# label_name: string
# sort: string
#
2015-04-26 12:48:37 +05:30
class IssuesFinder < IssuableFinder
2014-09-02 18:07:02 +05:30
def klass
Issue
end
2016-06-02 11:05:42 +05:30
private
def init_collection
Issue.visible_to_user(current_user)
end
2014-09-02 18:07:02 +05:30
end