Welcome to mirror list, hosted at ThFree Co, Russian Federation.

issue_command.rb « chat_commands « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
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