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

triggers_finder.rb « ci « finders « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a4b429539d625bc895fa65104e866f18e4a5cd5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

module Ci
  class TriggersFinder
    def initialize(current_user, project)
      @current_user = current_user
      @project = project
    end

    def execute
      return Ci::Trigger.none unless Ability.allowed?(@current_user, :admin_build, @project)

      @project.triggers
    end
  end
end