summaryrefslogtreecommitdiff
path: root/lib/gitlab/chat_commands/issue_command.rb
blob: 2426b3714b76bce461fc7ba459448df5c46e64b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module Gitlab
  module ChatCommands
    class IssueCommand < BaseCommand
      def self.available?(project)
        project.issues_enabled? && project.default_issues_tracker?
      end

      def collection
        project.issues
      end

      def readable?(issue)
        can?(current_user, :read_issue, issue)
      end
    end
  end
end