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

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

module Ci
  class RunnerMachinePolicy < BasePolicy
    with_options scope: :subject, score: 0

    condition(:can_read_runner, scope: :subject) do
      can?(:read_runner, @subject.runner)
    end

    rule { anonymous }.prevent_all

    rule { can_read_runner }.policy do
      enable :read_builds
      enable :read_runner_machine
    end
  end
end