gitlab-org--gitlab-foss/lib/gitlab/chat_commands/issue_command.rb
2016-11-17 21:34:24 +01:00

17 lines
343 B
Ruby

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