summaryrefslogtreecommitdiff
path: root/lib/gitlab/chat_commands/issue_command.rb
blob: f1bc36239d5250951e08167634789e8bb4f8d456 (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)
        self.class.can?(current_user, :read_issue, issue)
      end
    end
  end
end